【发布时间】:2014-05-21 14:53:44
【问题描述】:
我正在练习制作响应式网站我的问题是如何根据网页的分辨率调整图像大小? 这是我的代码:
<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 标签?
-
背景尺寸:100% 100%;
-
@ShibinRagh 背景图片
-
@CullyLarson 哎呀抱歉
-
@thenewbie 你检查我的答案了吗?