Html 全高/全宽背景图像
我有一个背景图像,我想在我的网站上使用它,但问题是我不能使它在任何大小的全高和全宽,帮助我,请检查下面的代码 当前代码,代码#1:轴和未满Html 全高/全宽背景图像,html,css,Html,Css,我有一个背景图像,我想在我的网站上使用它,但问题是我不能使它在任何大小的全高和全宽,帮助我,请检查下面的代码 当前代码,代码#1:轴和未满 body { background: url(http://localhost/wordpress/wp-content/uploads/2016/11/CHRISTINE-BACKGOURND.jpg) no-repeat center center fixed; -webkit-background-size: cover; -m
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
我做不到全宽和全高:(请帮忙
html{
宽度:100%,高度:100%;
}
正文{
背景图片:url(https://i.stack.imgur.com/s0G3w.jpg);
身高:100%;
宽度:100%;
}
请试试这个
HTML
身高:100%应该给我的感觉,照片是一种NSFW。
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;
}
<body></body>
html{
width:100%,height:100%;
}
body{
background: url(../image.jpg) no-repeat;
background-size:cover;
height:100%;
width:100%;
}