【发布时间】:2014-09-12 05:37:21
【问题描述】:
我最近注意到,在某些版本的 Google Chrome 中,当内容由脚本生成时,指南针使用的经典的纯 CSS 粘页脚解决方案不起作用。页脚只是覆盖内容而不是向下移动。当您调整窗口大小时,布局将更改为正确的布局。 compass 中的 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.resizechrome 将重新绘制有问题的页脚。
标签: javascript html css google-chrome compass-sass