问题
I am trying to make the background image of the div header scale to the size of the page. Here is the current css:
.Header {
background-image: url(Images/logo.png);
height: 160px;
width: 960px;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
}
回答1:
Make the position as absolute of the header and width as 100%
position:absolute;
width:100%;
来源:https://stackoverflow.com/questions/28653177/how-can-get-the-div-background-image-to-scale-to-the-page-size