Html Can';t make fit网站背景(CSS)

Html Can';t make fit网站背景(CSS),html,css,web,Html,Css,Web,如何使网站背景适合浏览器的高度? 这里是我的CSS的背景代码 #header { position: relative; background: url(girl.jpg) no-repeat fixed center bottom / cover transparent; text-align: center; } 我不想为图像设置高度:100%,因为我不想长时间向下滚动。我希望背景与我的浏览器宽度保持一致。有什么帮助吗 试试这个 body { background: url(

如何使网站背景适合浏览器的高度? 这里是我的CSS的背景代码

#header {
  position: relative;
  background: url(girl.jpg) no-repeat fixed center bottom / cover transparent;
  text-align: center;
}
我不想为图像设置高度:100%,因为我不想长时间向下滚动。我希望背景与我的浏览器宽度保持一致。有什么帮助吗

试试这个

body
{
background: url(girl.jpg) no-repeat fixed center bottom / cover transparent;
}

在css文件中添加上述css代码

你能做一个三明治吗?谢谢,我看不出你想要完成什么。你想让女人的形象填满屏幕吗?是的,我想用女人的照片填满屏幕。我这里的问题是,我不能为div类调整足够的图片高度。对不起,我的英语不好,因为我不是母语。你是说你想让女孩的形象覆盖背景,这样下面的套装形象就不会出现了?没错,这就是我想说的。