本文介绍了跨浏览器固定标题,页脚和可滚动内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获得固定标题,页脚与可滚动内容?像这样的。我可以看看源代码获取CSS,但我只想知道最小的CSS和HTML我需要得到这个工作。提前感谢。

how can I get a fixed header, footer with a scrollable content? something like this http://www.cssplay.co.uk/layouts/fixit.html. I can look at the source to get the CSS, but I just want to know minimum CSS and HTML I need to get this working. Thanks in advance.

推荐答案

类似这样

<html>
  <body style="height:100%; width:100%">
    <div id="header" style="position:absolute; top:0px; left:0px; height:200px; right:0px;overflow:hidden;">
    </div>
    <div id="content" style="position:absolute; top:200px; bottom:200px; left:0px; right:0px; overflow:auto;">
    </div>
    <div id="footer" style="position:absolute; bottom:0px; height:200px; left:0px; right:0px; overflow:hidden;">
    </div>
  </body>
</html>

这篇关于跨浏览器固定标题,页脚和可滚动内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 08:39
查看更多