我最近注意到,在某些版本的Google Chrome浏览器中,由脚本生成内容时,指南针使用的经典css-only粘性页脚解决方案不起作用。页脚仅覆盖内容而不是向下移动。调整窗口大小时,布局将更改为正确的布局。指南针的CSS/HTML是基于解决方案提供http://ryanfait.com/resources/footer-stick-to-bottom-of-page/粘性页脚铬不适用于动态内容
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -4em;
}
.footer, .push {
height: 4em;
}
有了下面的HTML:
任何想法,如何解决这一问题?
<html>
<head>
<link rel="stylesheet" href="layout.css" ... />
</head>
<body>
<div class="wrapper">
<p>Your website content here.</p>
<div class="push"></div>
</div>
<div class="footer">
<p>Copyright (c) 2008</p>
</div>
</body>
</html>
我有类似的问题。这似乎是一个铬错误。 由于'window.resize'上的铬会重新绘制车尾页脚。 – HaNdTriX 2014-11-05 21:12:54