4_和模型.html 841 B

1234567891011121314151617181920212223242526272829
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <style>
  8. div{
  9. /* 宽度 */
  10. width: 100px;
  11. /* 高度 */
  12. height: 100px;
  13. /* 背景色 */
  14. background-color: red;
  15. /* 外边距 让边框外面的标签距离当前标签的距离*/
  16. margin:10px;
  17. /* 边框 第一个值表示边框粗细 第二个值边框样式(solid 实线) 第三个值边框颜色 每个值之间用空格连接*/
  18. border: 1px solid black;
  19. /* 内边距 内部内容与边框的距离*/
  20. padding: 10px;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <div>hello</div>
  26. <div>world</div>
  27. </body>
  28. </html>