CSS Property Value - 如何background-size: cover; 在背景圖象上面的背景顏色
我們想知道如何background-size: cover; 在背景圖象上面的背景顏色。
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {
background: red url("http://hgci.cn/style/download.png") center top no-repeat
fixed;
background-size: cover;
}
#content {
background: #fff;
margin: 20px auto;
padding: 10px 15px;
width: 80%;
}
</style>
</head>
<body>
<!-- Head and body should be here -->
<div id="content">
<p>My content, articles images and stuff</p>
</div>
<!-- body closing tag should be here -->
</body>
</html>