Home > Web Front-end > CSS Tutorial > A graphic introduction to cascading and inheritance in CSS

A graphic introduction to cascading and inheritance in CSS

黄舟
Release: 2017-06-18 13:23:12
Original
1561 people have browsed it

ThreeInheritancecss methods

1. Intra-segment inheritance

style="color: red;font-size:50px;">Style original text

  1. ##The original text changes to red,

  2. The original text font changes to red Big

Both are achieved by changing the value of the style attribute. Detailed syntax explanation:

1. Each style attribute will have a different value. "color: red" expresses the attribute of color through a colon.

2. Use semicolons and semicolons to separate attributes. Closed

3.font-size is a composite attribute

2. Inherited within the document