CSS Introduction Method:
1. Internal style
style tag
in the head tag
Application scope: currently applied throughout the page
2. Inline style
Style Property
<p style= "color:black; font-size:24px" > Inline style </p>
Application scope: specified in-label application, higher priority than internal style
It's not recommended in this way .
3. External style
Disclaimer:. CSS style Files
introduced:
link mode: <link href= "CSS file" rel= "stylesheet" type= "Text/css"/>
apps: Sharing across multiple pages
Priority level:
inline > Internal > External
Note: Priority is considered when you have the same style
CSS Advanced selector:
1. Descendant selector:
apply to elements that have nested relationships
Selector 1 Selector 2, separating each selector with a "space"
2. Intersection selector:
Selector 1 Selector 2, each selector is linked directly together
further narrowing down the selection range
. Clcss class selector, applied on any tag
p. clcss descendant selector, applied to a child tag on the P tag
p.clcss intersection selector, applied on p mark with class= "Clcss"
#p1. CLS: Select the tag with the id attribute "P1" and select class in the tag
is a sub-tag of "CLS"
3. The set selector:
Selector 1, selector 2, selector 3{};
apply: Set the same style for different selectors
Note: The selector is a previously learned arbitrary selector
Inheritance Features:
tag with nested relationship, outer tag called parent tag, inner tag called child tag
A child tag can inherit the style of a tag, which in turn is not true
CSS Introduction method, Advanced Selector