我正在练习制作响应式网站我的问题是如何根据网页的分辨率调整图像大小? 这里是我的代码:在HTML中调整响应模板的背景图像
<html>
<head>
<meta charset="utf-8">
<style>
body {
background: url("streetlight.png");
width: 100%;
height: 100px;
background-attachment: fixed;
position: absolute;
background-repeat: no-repeat;
}
</style>
</head>
<body>
</body>
</html>
你看背景图片?或IMG标签? – ShibinRagh
background-size:100%100%; –
@ShibinRagh背景图片 – thenewbie