我最近注意到,在某些版本的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