gpt4 book ai didi

html - 具有全高的 css 主背景图像

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

这是我试过的CSS;

CSS:

.main
{
width: 65%;
background:url("../slice/body-bg.jpg");
display:block;
float: left;
margin-left: 0px;
min-height:100% !important;
height:auto;
padding: 0px 12px;
}

这是示例输出屏幕截图:http://s18.postimg.org/q5zi9g7mh/untitled.jpg

我在 html {height:100%;}

中使用
.main {min-height:100%; height:auto;}

但它仍然对我不起作用。

谁能帮我解决这个问题?

如有任何帮助,我们将不胜感激。

谢谢。

最佳答案

参见示例:fiddle

HTML

<div class="main">123</div>

CSS

html, body{width:100%; height:100%;}

关于html - 具有全高的 css 主背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35739178/

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