gpt4 book ai didi

html - 试图模仿 Lamborghini.com 的布局无济于事

转载 作者:行者123 更新时间:2023-11-28 13:46:35 24 4
gpt4 key购买 nike

我正在尝试模仿具有固定页眉和页脚的布局,其内容适合两者之间,无需 javascript 或使用表格。你可以看到我在找什么HERE

最佳答案

其实这个很简单。这是完整的代码,只需复制并粘贴即可。

感谢 Jeremy (http://stackoverflow.com/questions/206652/how-to-create-div-to-fill-all-space-between-header-and-footer-div)。

<style type="text/css">
html, body
{
height: 100%;
padding: 0;
margin: 0;
}

#header
{
height: 100px;
color: #FFF;
background: #000;
}

#content
{
min-height: 100%;
height: auto !important; /*Cause footer to stick to bottom in IE 6*/
height: 100%;
margin: 0 auto -100px; /*Allow for footer height*/
vertical-align:bottom;
color: #FFF;
background: #333;
}

#footer
{
height: 100px;
color: #FFF;
background: #000;
}

#divider
{
height: 100px; /*Divider must be same height as Footer */
}

</style>

<div id="content">
<div id="header">
Header
</div>

Content Text

<div id="divider"></div>
</div>
<div id="footer">
Footer
</div>

关于html - 试图模仿 Lamborghini.com 的布局无济于事,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11818173/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com