最近部署了一个响应式文字新闻模板,插件最少 . 页脚适用于手机模拟器和桌面 . 在实际设备上,它会在内容上方的 Headers 下方拍摄 . 我希望页脚粘在底部 .
我的mobiel测试设备是一个nexus 5(1080p) .
我尝试用通常的建议改变页脚,但两者都没有用 . 我甚至关闭了确定移动设备的PHP功能,但它仍然无效 .
这是页脚CSS
这是响应式CSS和PHP代码
if ($px_theme_option['responsive'] == "on") {
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">';
wp_enqueue_style('responsive_css', get_template_directory_uri() . '/css/responsive.css');
CSS(来自responsive.css的relvant页脚类)
/*============ Media 768Px Start ============ */
@media (min-width: 768px) and (max-width: 979px) {
#footer{
overflow:hidden;
}
/*============ Media 420Px Start ============ */
@media (max-width: 767px) {
#footer{
height:67px;
}
#footer p{
margin:0 0 0 10px;
}
#footer{
overflow:hidden;
}
/*============ Media 300Px Start ============ */
@media (max-width: 480px) {
#footer{
height:120px;
}
#footer p{
margin:0;
padding:0px 44px 0px 0px;
}
可能是相关的,新闻文章是正确的,它涵盖了他们 . 我认为这是在下面拍摄它并没有应用(因为我在世界新闻和页面中切换了一些catogories?) .
.news-section article figure{
height:100%;
}
#footer p{
margin:0 0 0 10px;
}
#footer{
overflow:hidden;
}
/*============ Media 940Px Start ============ */
@media screen and (min-width: 900px) and (max-width: 1054px){
#footer{
overflow:hidden;
}
默认(我假设桌面,因为它在单独的style.css文件中)
#footer {
max-width: 1160px;
margin: 0 auto;
background: #141414;
position: relative;
z-index: 99;
height: 56px;
font-size: 0;
line-height: 0;
padding-top: 17px;
border-top: 10px solid #0c0c0c;
box-shadow: -10px 10px #141414,10px 10px #141414 ;
}
#footer p {
float: left;
line-height: 25px;
margin: 0 0 0 35px;
font-size: 11px;
color: #555;
font-style: normal;
}
页脚HTML
</div>
</div>
</div>
<!-- Inner Main -->
</div>
<footer id="footer">
<p class="coptyright">
<?php echo do_shortcode(htmlspecialchars_decode($px_theme_option['copyright'])); ?>
<?php echo do_shortcode(htmlspecialchars_decode($px_theme_option['powered_by'])); ?>
</p>
<?php
if($px_theme_option['footer_social_icons'] == 'on'){
px_social_network();
}
?>
<a href="" class="btn btngotop"><i class="fa fa-arrow-circle-o-up"></i></a>
</footer>
</div>
<!-- Wrapper End -->
<?php
px_footer_settings();
wp_footer();?>
</body>
</html>
1 回答
尝试添加
这应该保持在底部 .