【问题标题】:Sticky footer in ember js [duplicate]ember js中的粘性页脚[重复]
【发布时间】: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; &amp;&amp; bottom: 0; 在页脚选择器上。你试过吗?
  • 这是一个Plunker 向您展示我需要让它工作的css。

标签: html css ember.js


【解决方案1】:

在您的 CSS 中,您应该将以下属性添加到您的页脚

footer {
position: fixed;
bottom: 0;
}

【讨论】:

  • 我不想要固定页脚。我想把页脚贴到页面底部
猜你喜欢
  • 2014-03-15
  • 2014-08-13
  • 1970-01-01
  • 2013-02-23
  • 2015-05-06
  • 2018-05-09
  • 2018-08-17
  • 1970-01-01
  • 2012-12-28
相关资源
最近更新 更多