閱讀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之數值的整數次方