Home  >  Article  >  Web Front-end  >  Inheritable properties in CSS

Inheritable properties in CSS

不言
不言Original
2018-04-21 15:47:391701browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn