CSS Advanced (2) - Features
Others
2022-04-27 23:09:29
views: 0
2 CSS features
2.1 Inheritance
- Inheritance of CSS means that child elements can inherit certain style properties of parent elements, thereby reducing the writing of repetitive code.
- But not all properties are inherited. There are three types of properties with inheritance in CSS:
- Text-related properties:
font
( font-family
/ font-size
/ font-style
/ font-weight
), line-height
, text-align
, textindent
, word-spacing
;
- List-related properties:
list-style-image
, list-style-position
, list-style-type
, list-style
;
- Color-related properties:
color
;
2.2 Cascading
- The cascading nature of CSS means that the same element can be styled according to the weight of the selector.
Origin http://43.154.161.224:23101/article/api/json?id=325921508&siteId=291194637