gpt4 book ai didi

html - 全高/全宽背景图片

转载 作者:行者123 更新时间:2023-11-28 16:06:38 25 4
gpt4 key购买 nike

我有一张背景图片,我想在我的网站上使用它,但问题是我无法将其制作成任何尺寸的全高和全宽,请帮助我,请检查下面的代码

当前代码,代码 #1:haft 而不是 full

body {
background: url(http://localhost/wordpress/wp-content/uploads/2016/11/CHRISTINE-BACKGOURND.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
/* background-size: cover; */
height: auto!important;
width: 100%!important;
}

代码#2

body {
background: url(http://localhost/wordpress/wp-content/uploads/2016/11/CHRISTINE-BACKGOURND.jpg) no-repeat center center fixed;
background-color: white;
background-size: auto 100%;
background-repeat: no-repeat;
background-position: left top;
}

我不能让它全宽和全高:(请帮忙

最佳答案

html{
width:100%,height:100%;
}
body{
background-image: url(/image/s0G3w.jpg);
height:100%;
width:100%;
}
<body>
</body>

关于html - 全高/全宽背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40797868/

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