css CSS:粘性页脚2

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css CSS:粘性页脚2相关的知识,希望对你有一定的参考价值。

* {
  margin: 0;
}


html {
  height: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

body {
  position: relative;
  min-height: 100%;
  padding-top: 15px;
  padding-bottom: 152px;
}


footer.site-footer div {
width: 900px;
margin: 0px auto;
}


.site-footer {
  position: absolute;
  background: #385978;
  border-top: 10px solid #d7cdbc;
  color: white;
  height: 142px; /*==========  Height and border-top added together = 151px used in .site-footer  ==========*/
  width: 100%;
  bottom: 0; 
}

以上是关于css CSS:粘性页脚2的主要内容,如果未能解决你的问题,请参考以下文章

css CSS:粘性页脚1

CSS 粘性页脚CSS

CSS 粘性CSS页脚

粘性页脚问题 - CSS

如何使用 CSS 制作粘性页脚?

CSS - 粘性页脚[重复]