This article introduces the inheritable properties in CSS, which has certain reference value. Now I share it with everyone. Friends in need can refer to it
Inheritance means that child nodes use the parent node by default style attributes.
There are too many non-inheritable attributes. Don’t memorize them. Just remember which attributes can be inherited. There are very few properties that can be inherited, only color, text, font spacing, line height alignment, and list styles can be inherited. It’s so easy to remember this way! Don’t be scared by what’s below~
所有元素可继承:visibility和cursor。 内联元素可继承:letter-spacing、word-spacing、white-space、line-height、color、font、font-family、font-size、font-style、font-variant、font-weight、text-decoration、text-transform、direction。 终端块状元素可继承:text-indent和text-align。 列表元素可继承:list-style、list-style-type、list-style-position、list-style-image。
The above is the detailed content of Inheritable properties in CSS. For more information, please follow other related articles on the PHP Chinese website!