1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
6 <title>Document</title>
7 <style type="text/css">
8 body{
9 margin: 0
10 }
11 .box1{
12 font-size: 12px;
13 width: 20em;
14 height: 10em;
15 background-color: gold;
16 /* 宽默认是body的宽 高等于16*10 */
17 }
18 </style>
19 </head>
20 <body>
21 <div class="box1">1</div>
22 <div class="box2"></div>
23 </body>
24 </html>