我正在尝试使 div header 的背景图像缩放到页面大小。这是当前的 CSS:
.Header {
background-image: url(Images/logo.png);
height: 160px;
width: 960px;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
}
最佳答案
将位置设为表头的绝对位置,宽度设为100%
position:absolute;
width:100%;
关于html - 如何让 div 背景图像缩放到页面大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28653177/