【发布时间】:2015-09-07 01:27:12
【问题描述】:
我正在阅读有关边框框的文章。
http://www.paulirish.com/2012/box-sizing-border-box-ftw/
作者推荐以下CSS代码:
/* apply a natural box layout model to all elements, but allowing components to change */
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
我知道 :before 和 :after 用于插入内容并设置插入内容的样式。
但是没有内容的 :before 和 :after 的目的是什么?
谢谢
【问题讨论】: