摘要: 1. 标准盒模型 在标准模型中,如果你给盒设置 width 和 height,实际设置的是 content, padding 和 border 再加上设置的宽高一起决定整个盒子的大小 <style> .box { width: 350px; height: 150px; margin: 25px; 阅读全文
posted @ 2022-05-30 14:48 半糖也甜吖 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 1. id选择器 <style> #container { width: 100px; } </style> <body> <div id="container"></div> </body> 2. class选择器 | 类选择器 <style> .container { width: 100px; 阅读全文
posted @ 2022-05-30 10:38 半糖也甜吖 阅读(232) 评论(0) 推荐(0) 编辑