【发布时间】:2014-07-02 20:50:02
【问题描述】:
我在这里徘徊我做错了什么。我试图摆脱滚动条(垂直)。我试过去掉填充物,甚至调整高度。无法弄清楚我可能错过了什么。非常感谢帮助
http://jsfiddle.net/jSB53/embedded/result/
/* Sticky footer styles
-------------------------------------------------- */
html, body {
height: 100%;/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by it's height */
margin: 0 auto -70px;
/* Pad bottom by footer height */
padding: 0 0 60px;
}
#footer {
background-color: #ee3124;
color: #FFFFFF;
height: 70px;
padding: 20px 0 0;
}
.navbar-default {
border-bottom: 5px #ee3124 solid;
background-color: #fff;
margin-top: 20px;
height: 33px;
-webkit-box-shadow: 0 4px 4px -2px #C7C7C7;
-moz-box-shadow: 0 4px 4px -2px #C7C7C7;
box-shadow: 0 4px 4px -2px #C7C7C7;
}
/* Lastly, apply responsive CSS fixes as necessary */
@media (max-width: 767px) {
#footer {
margin-left: -20px;
margin-right: -20px;
padding-left: 20px;
padding-right: 20px;
}
}
【问题讨论】:
-
你是指横向还是纵向还是两者兼而有之?
-
滚动条仅垂直出现 =)))
-
底部有一个hori滚动条,因为如果您的媒体查询中有负边距。
-
自己想通了。这是我这边的一个错误。向导致滚动条出现的 div 添加边距。我的错。
标签: css twitter-bootstrap sticky-footer