如何把图片做成移动端适配

代码如下

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>计价规则</title>
</head>
<body>
  < img src="http://cdn.quchuxing.com/h5/rule.png"/>
</body>
<style>
  body,html {
    margin: 0;
    width: 100%;
    height: 100%;
  }
  img {
    width: auto;
    height: auto;
    max-width: 100%;
  }
</style>
</html>

你可能感兴趣的:(点滴积累)