盒模型-

 1 <html lang="en">
 2 <head>
 3     <meta charset="UTF-8">
 4     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 5     <meta http-equiv="X-UA-Compatible" content="ie=edge">
 6     <title>box-盒模型</title>
 7     <style>
 8      div{
 9          width: 200px;
10          height: 200px;
11          margin: 10px;
12          padding: 5px;
13          background-color: aliceblue;
14          border: 1px solid black;
15      }
16      div:first-child{
17          box-sizing: content-box;
18      }
19      div:last-child{
20          box-sizing:border-box;
21      }
22     </style>
23 </head>
24 <body>
25    <div> content-box</div> 
26    <div>border-box</div>
27 </body>
28 </html>
原文地址:https://www.cnblogs.com/yuanxiangguang/p/11318000.html