【发布时间】:2015-06-10 21:09:07
【问题描述】:
我有 emberjs 应用程序,我尝试创建粘性页脚。
我的html:
<div class="main-container" id="">
<header> HEADER </header>
<div class="container">
{{outlet}}
</div>
<footer>
footer text
</footer>
</div>
CSS:
.ember-view {
height: 100%;
}
.main-container {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -40px;
}
footer {
clear: both;
line-height: 40px;
width: 100%;
}
由于未知原因,页脚仍然没有粘在底部。
有什么想法吗?
非常感谢:)
【问题讨论】:
-
position: fixed; && bottom: 0;在页脚选择器上。你试过吗? -
这是一个Plunker 向您展示我需要让它工作的css。