阅读490 返回首页    go 阿里云 go 技术社区[云栖]


精通css(7)-实例

1.让footerr固定在底部

来源于https://ryanfait.com/resources/footer-stick-to-bottom-of-page/一种很简单的方法:

<body>
<div >
    <p>Your website content here.</p>
    <div ></div>
</div>
<div >
    <p>Copyright (c) 2008</p>
</div>
</body>

<style>
  * {
   margin: 0;
  }
   html, body {
   height: 100%;
  }
   .wrapper {
   min-height: 100%;
   height: auto !important;
   height: 100%;
   margin: 0 auto -4em;
  }
   .footer, .push {
   height: 4em;
  }
  .footer{
    background: #400;
  }

</style>


最后更新:2017-04-03 14:54:08

  上一篇:go [Qt教程] 第12篇 2D绘图(二)渐变填充
  下一篇:go 剑指Offer之数值的整数次方