我有一个HTML文件,然后我设置背景图片网址,但图像没有填满浏览器的宽度:背景图像宽度不工作
我也尝试设置width
属性使其更宽,但它似乎没有效果。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
#bg {
height:1500px;
background: url("img/timg7.jpg") center top no-repeat;
width:1800px;
}
</style>
</head>
<body id="bg">
<div style="width:400px; height: 200px; background-color: antiquewhite">
BLOCK
</div>
</body>
</html>
你给了你的身体宽度?那是什么? – PHPglue