作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图让页脚齐平到页面底部,但不一定是粘性的 - 只要在底部以防用户向下滚动到那里。
这“有效”,但在页脚出现后底部似乎有一点空白,看起来有点尴尬。有谁知道使用 CSS 将页脚冲到底部并将其保持在最底部而不使其粘滞的最佳方法吗?
如果您想让我发布我的 html/css,请告诉我。
最佳答案
网络上有很多很好的例子。
这是一个据称更新的版本:http://mystrd.at/modern-clean-css-sticky-footer/ ;我没有这方面的经验。
这是已经存在很长时间并被许多人广泛使用的经典版本:
http://www.cssstickyfooter.com/html-code.html (回程机存档)
这是我自己对第二个链接的略微编辑版本,我很幸运。
/* Sticky Footer Stuff
*/
html,body { height: 100%; }
#sticky-wrap { min-height: 100%; }
.footer {
height: 160px;
margin-top: -160px;
}
/* end sticky footer stuff
*/
<div class="wrapper" id="sticky-wrap">
<div class="content-area”>
</div>
</div>
<footer>
</footer>
关于html - 页脚在底部但不粘,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26770748/
查看此页面:http://jsbin.com/itufix使用 IE(页面自动启用 IE7 模式)。 在这里您将找到如何使用显示 block 呈现内联元素(输入和跨度)的示例。所有元素的边距和填充都设
我有一个自定义的 UITabvleViewCell,其中有一个 UIImageView。当在 cellForRowAtIndexPath 中设置单元格时,我可以很好地设置图像(尽管我没有),但是在某些
我是一名优秀的程序员,十分优秀!