css Sticky footer html5(http://ryanfait.com/html5-sticky-footer/)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css Sticky footer html5(http://ryanfait.com/html5-sticky-footer/)相关的知识,希望对你有一定的参考价值。

<html>
  <head>
    <link rel="stylesheet" href="layout.css" />
  </head>
  <body>
    <div class="wrapper">
      <p>Your website content here.</p>
      <div class="push"></div>
    </div>
    <footer>
      <p>Copyright (c) 2008</p>
    </div>
  </body>
</html>
* {
	margin: 0;
}
html, body {
	height: 100%;
}
.wrapper {
	min-height: 100%;
	margin: 0 auto -155px; /* the bottom margin is the negative value of the footer's height */
}
footer, .push {
	height: 155px; /* '.push' must be the same height as 'footer' */
}

以上是关于css Sticky footer html5(http://ryanfait.com/html5-sticky-footer/)的主要内容,如果未能解决你的问题,请参考以下文章

CSS Sass Sticky Footer Mixin

CSS Sticky Footer 实现的问题

css 粘性页脚 - http://9seeds.com/tech/sticky-footer-genesis/

sticky footer布局,定位底部footer

sticky footer

raamwerk sticky footer center 3科洛门分部