box-sizing: content-box
时间: 2023-09-30 17:11:03 浏览: 90
box-sizing: content-box是CSS中的一个属性,用于定义盒子的宽度和高度的计算方式。当设置为content-box时,盒子的宽度和高度不包括元素的内边距和边框。也就是说,设置的width和height只包括元素的内容部分,不包括元素的内边距和边框。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [边框盒子 box-sizing 的 content-box 和 border-box属性](https://blog.csdn.net/qq_45288176/article/details/125293359)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [CSS3 box-sizing属性详解](https://download.csdn.net/download/weixin_38674992/13671293)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文