Jquery 页脚(导航栏)不相对于侧边栏
我对网页开发有点陌生。所以,请容忍我。我使用Bootstrap3中的导航栏创建了我网站的页脚 显然,我需要页脚留在页面底部。我的网格系统是282。现在,页脚完全适用于中间网格,即,Jquery 页脚(导航栏)不相对于侧边栏,jquery,twitter-bootstrap-3,Jquery,Twitter Bootstrap 3,我对网页开发有点陌生。所以,请容忍我。我使用Bootstrap3中的导航栏创建了我网站的页脚 显然,我需要页脚留在页面底部。我的网格系统是282。现在,页脚完全适用于中间网格,即,col-8。但对于正确的专栏来说,失败得很惨 页脚: <div class="footer navbar navbar-default navbar-fixed-bottom"> <div class="container"> <p class="navbar-te
col-8
。但对于正确的专栏来说,失败得很惨
页脚:
<div class="footer navbar navbar-default navbar-fixed-bottom">
<div class="container">
<p class="navbar-text pull-left"> Footer</p>
</div>
</div>
问题场景:
请看一个例子
在html/css中,您必须添加:
CSS:
HTML:
<div class="wrapper">
<p>Your content.</p>
<div class="push"></div>
</div>
<div class="footer">
<p>Copyright</p>
</div>
你的内容
版权所有
可以使用粘性页脚。看看这个HTML和CSS(右键点击浏览器查看源代码,点击HTML中的CSS文件)@Roy至少添加CSSHTML,body{height:100%;overflow:auto;}
有人请给我一个解决方案,请记住我使用的是Bootstrap的导航栏作为页脚,它与中间的网格完美地响应。我希望两边较小的网格也会发生同样的情况。抱歉这么晚了。我很久以前就解决了这个问题,无法回复,抱歉。仅使用页面的最小宽度。
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -155px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
height: 155px; /* .push must be the same height as .footer */
}
<div class="wrapper">
<p>Your content.</p>
<div class="push"></div>
</div>
<div class="footer">
<p>Copyright</p>
</div>