Thoroughly learn CSS-1 in one article

Thoroughly learn CSS-1 in one article

1. Basic concepts of CSS

1. CSS first experience

The role of css is to set the style (color, size, font, position, etc.) of the elements (tags) in the page
Insert picture description here

2. CSS related properties

Insert picture description here

3.CSS concept

Cascading style sheets
Insert picture description here

2. Font attributes (font-)

1. Font size

Insert picture description here

2. Font weight

Insert picture description here

3. Font style

Insert picture description here
Insert picture description here

4. Continuous writing

Insert picture description here

Three, developer debugging

Developer debugging tools: debugging, troubleshooting, and finding bugs. Essential equipment for programmers~
Insert picture description here

Four, simple (basic) selector

Tag selector, class selector, ID selector

The selector is used to select the corresponding label, and then add the corresponding style to the selected label

1. Tag selector (tag name)

Insert picture description here

2. Class selector (.)

Insert picture description here
Insert picture description here

3.ID selector (#)

Insert picture description here
Insert picture description here

Special note:

The difference between id and class

Insert picture description here

What is the difference between id selector and class selector?

Insert picture description here

Actual development

Insert picture description here

Five, complex (composite) selector

1. Wildcard selector (*)

Insert picture description here

2. Union selector (,)

Insert picture description here

3. Intersection selector

Insert picture description here

4. Descendant selector (space)

Insert picture description here

5. Child selector (>)

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Six, small details of expansion

1. The attributes of the color (just know it)

Insert picture description here
Insert picture description here

2. Annotation

Insert picture description here

Seven, the three writing positions of CSS

Inline (embedded) style sheet, inline style sheet, external (external) style sheet

1. Embedded style

Insert picture description here

Inline style

Insert picture description here

Outreach style

Insert picture description here

Summary of three style sheets

Insert picture description here

8. text- text related attributes

1.text-indent: Indentation of text

Insert picture description here

text-align: the alignment of the text

Insert picture description here

text-decoration: text decoration

Insert picture description here

Nine, center the box horizontally

Insert picture description here

Ten, the three characteristics of CSS

Explain some effects of css~

1. Inheritance

Insert picture description here

2. Stackability

Insert picture description here

3. Priority (important)

There are many ways to style a label on the page~

When the set styles are cascaded, priority (weight) needs to be considered

priority

Insert picture description here

Weights

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/xiaotai1234/article/details/108521627