<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>图片宽度自适应</title>
<style type="text/css">
img{
max-width: 100%;//一个max-width解决图片响应式
}
_img{width:100%;}//兼容IE6
</style>
</head>
<body>
<img src="images/homepage.jpg" alt=""/>
</body>
</html>