在这个网站http://themescreators.com/ela/我正在使用一些谷歌字体.所有这些都在Chrome,FF上运行良好..但在Windows 7上的IE 10和11上,"蒙特塞拉特"字体不显示.我真的不知道可能是什么问题,IE是否与一些谷歌字体不兼容?
如果您访问Windows 7上的网站,您将清楚地看到问题,所有"蒙特塞拉特"h1,h2 ......都不可见.
提前致谢!
我最近开始使用git并对最佳工作流程有所怀疑.
1 - 最好使用像Bitbucket这样的在线存储库作为本地服务器和远程服务器之间的中介吗?O直接从本地部署到远程部署会更好吗?
我认为拥有这个中间存储库会很棒,因为它会像备份一样,但也会使我的工作流程变得复杂.
2 - 如果我将代码推送到Bitbucket,将代码部署到远程服务器的最佳方法是什么?我找到了一些不同的方法:
从长远来看,我希望这种方式更有效,但这并不会给我带来很多麻烦.我不介意付钱或学习新东西(我从不使用capistrano ......).
如果您知道任何其他方式,我很乐意阅读!
这是我的网站:http://themescreators.com/seven-host/
我使用自定义加载效果,由于某种原因它不能很好地工作.
这是加载效果使用的代码:
HTML:
<div class="loadingContainer">
<div class="loading">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
.loadingContainer {
text-align: center;
margin: 0 auto;
position: absolute;
top: 50%;
left: 50%;
display: inline-block;
z-index: 1000;
}
.loadingContainer .loading {
display: inline-block;
text-align: center;
}
.loadingContainer .loading > div {
background-color: #21242e;
height: 80px;
width: 6px;
display: inline-block;
-webkit-animation: stretchdelay 1.2s infinite ease-in-out;
animation: stretchdelay 1.2s infinite ease-in-out;
}
.loadingContainer .loading .rect2 {
-webkit-animation-delay: -1.1s; …Run Code Online (Sandbox Code Playgroud) 我在我的网站上使用蒙特塞拉特字体,但它不显示在IE11(Windows 7)上.几天前我提出了另一个问题:IE 10和11上没有显示蒙特塞拉特字体
现在我想通过css添加蒙特塞拉特谷歌字体但它似乎不起作用.这是我的代码:
@font-face {
font-family: 'Montserrat';
src: url('assets/fonts/montserrat-regular-webfont.eot');
src: url('assets/fonts/montserrat-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/montserrat-regular-webfont.woff2') format('woff2'),
url('assets/fonts/montserrat-regular-webfont.woff') format('woff'),
url('assets/fonts/montserrat-regular-webfont.ttf') format('truetype'),
url('assets/fonts/montserrat-regular-webfont.svg#montserratregular') format('svg');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud) 我正在创建一个使用第三方API的PHP类.API有一个具有此请求URL结构的方法:
https://api.domain.com/path/sales?page=x
Run Code Online (Sandbox Code Playgroud)
其中"x"是页码.
每个页面返回50个销售额,我需要为每个用户返回一个未定义的页数(取决于用户销售额)并存储每个销售的一些数据.
我已经创建了一些从URL获取数据的方法,解码并创建一个包含所需数据的新数组,但仅限于第一页请求.
现在我想创建一个方法来检查是否有另一个页面,如果有,请获取它并再次进行检查
如何检查是否有其他页面?如果有另一个页面,如何创建一个循环?
我已经有了这个代码,但它创建了一个无限循环.
require('classes/class.example_api.php');
$my_class = new Example_API;
$page = 1;
$sales_url = $my_class->sales_url( $page );
$url = $my_class->get_data($sales_url);
while ( !empty($url) ) {
$page++;
$sales_url = $my_class->sales_url( $page );
$url = $my_class->get_data($sales_url);
}
Run Code Online (Sandbox Code Playgroud)
我不使用CURL,我用file_get_content.当我请求页面超出范围时,我得到以下结果:
string(2) "[]"
Run Code Online (Sandbox Code Playgroud)
而另一个之后json_decode:
array(0) { }
Run Code Online (Sandbox Code Playgroud) 我试图设置一个div等于另一个的高度.我会称他们为左右div.正确的div内容并不总是相同的,并加载了jQuery.它是一个过滤器,因此每次单击过滤器时,内容都会更改,也会更改父div高度.
这是我的代码:
jQuery(document).ready(function($) {
$(window).resize(function() {
location.reload();
});
var Height = $("#archive").outerHeight();
$('.recursos-sidebar').css("height", Height);
});
Run Code Online (Sandbox Code Playgroud)
问题是,当div为空(没有加载内容)时,左div高度等于右div.
有人知道每次内容更改后如何才能获得正确div的高度?
我尝试验证我的HTML代码,我发现了这个警告:空标题.看这里
显然标题不是空的.<h3></h3>在WordPress中,按the_title()函数生成内容.所以,我不明白为什么会发生这种情况..有人可以解释一下这是什么问题?谢谢!
我有一些css代码使用:before和:after selectors:
.caption-wrap .line-3:before,
.caption-wrap .line-3:after {
content: " ";
position: absolute;
width: 50px;
height: 5px;
border-top: 1px solid #FFFFFF;
border-bottom: 1px solid #FFFFFF;
}
.caption-wrap .line-3:before {
margin: 7px 0 0 -60px;
}
.caption-wrap .line-3:after {
margin: 7px 0 0 10px;
}
Run Code Online (Sandbox Code Playgroud)
幻灯片HTML标记:
<li>
<img src="images/mountains.jpg" class="parallax-bg" alt="">
<div class="overlay"></div>
<div class="container hidden-xs">
<div class="caption-wrap">
<p class="line-1">we are</p>
<h1 class="line-2 dashed-shadow">
MINIMAL</h1>
<h4 class="line-3">Design | Develpment | Success</h4>
<p class="line-5">
<a href="#">codenpixel</a>
<a href="#">retrograde</a>
</p>
<p class="line-6">2014</p>
</div>
</div> …Run Code Online (Sandbox Code Playgroud) 出于某种原因,我无法使用 WordPress 函数 get_editable_roles()。这有问题吗?不介意我在哪里添加,在functions.php,在index.php,在顶部,在底部。它总是给出未定义的函数错误。
我在 25 个主题中添加了这行代码,在一个新的 WordPress 安装中并且没有任何插件:
$role = get_editable_roles();
Run Code Online (Sandbox Code Playgroud)
它给出了这个错误:
错误:调用未定义的函数 get_editable_roles()...
如果我之前加载 user.php 文件,那么它可以工作:
if (!function_exists('get_editable_roles')) {
require_once(ABSPATH . '/wp-admin/includes/user.php');
}
Run Code Online (Sandbox Code Playgroud) 所以我试图只从WordPress中提取最新的粘贴帖子而且只有1.我使用'showpost = 1'但是出于某种原因如果我有两个标记为粘贴的帖子都出现了?
<h2>Breaking News</h2>
<?php
query_posts('posts_per_page=1');
if (have_posts()) {
while (have_posts()) : the_post();
if ( is_sticky() ) : ?>
<div class="small-12 medium-6 large-4 columns">
<div class="img-holder">
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail('sticky-hp-thumbnails');
}
?>
<?php if( get_field('sticky_sub_heading') ): ?>
<div class="tag">
<p>
<?php the_field('sticky_sub_heading'); ?>
</p>
</div>
<?php endif; ?>
</div>
</div>
<div class="small-12 medium-6 large-4 columns">
<h3><a href"<?php the_permalink() ?>">
<?php the_title(); ?>
</a></h3>
<?php …Run Code Online (Sandbox Code Playgroud) wordpress ×4
css ×3
fonts ×2
jquery ×2
php ×2
api ×1
bitbucket ×1
deployment ×1
git ×1
height ×1
html ×1
html5 ×1
pagination ×1
safari ×1
sticky ×1
syntax-error ×1
validation ×1
wp-query ×1