gpt4 book ai didi

html - clearfix 的问题

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

我创建了一个html,可以找到http://temp87.web44.net/temp.html .我面临的问题是页脚后的页面底部有一条灰色 strip ,并且该页面未占用 100% 的浏览器空间。

enter image description here

导致问题的 CSS..

.clearfix:after {
content: "."; //If this is commented out the page fits in perfectly, but the background of <div>storyWrapper clearfix</div> goes off.
display: block;
height: 0;
clear: both;
visibility: hidden;
}

问题2:我还想要高度

<div class="detailsContent"/> 

根据屏幕分辨率自动适配。现在计算的高度始终为 619px,在大型显示器中整个页面仅占屏幕的 75%。

最佳答案

content 中删除 "."。像这样写:

.clearfix:after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

关于html - clearfix 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10793146/

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