如何在滚动条上重叠元素保持固定位置的页脚?

时间:2017-09-19 14:32:38

标签: html css

我已经阅读了其他SO帖子,询问了这个问题,但它不适用于我的HTML / CSS。

https://jsfiddle.net/hmsrj1jh/

body, html {
  margin: 0 auto;
  padding: 0;
}

.container-fluid {
  padding: 0px !important;
}

.right {
  background-color: gray;
  width:100%;
  height:100vh;
}

.left {
  background-color: purple;
  width: 100%;
  height: 100vh;
}

.footer {
  position: fixed;
  padding: 20px;
  bottom: 0;
  width:100%;
}

HTML

<div class="wrapper">
    <div class="container-fluid">
      <div class="left">
      </div>

      <div class="right">
        <div id="results">
        </div>
        <div class = "footer">
          Footer
        </div>
      </div>
    </div>
  </div>

0 个答案:

没有答案