What are the selectors of Css3
This article introduces the relevant knowledge of "what are the selectors of Css3". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
In css, a selector is a pattern for selecting elements that need to be styled
Css selectors can be divided into the following categories:
1. Id selector # box {}
two。 Class selector .box {}
3. Tag selector a {} and a, H2, p {}
4. Adjacent selector h _ 2selecp {}
5. Subselector ul > li {}
6. Descendant selector li a {}
7. Wildcard selectors * {} and * a {}
8. Property selector a [rel= "external"] {}
9. Pseudo class selector a:hover {}
The pseudo-class selector in CSS3 is as follows:
State pseudo class selector
1:link
2:visited
3:hover
4:active
5:focus
6:lang
7:target
Structural pseudo-class selector
1:first-letter
2:first-line
3:before
4:after
5:root ()
6:not ()
7:empty ()
8:target ()
9:first-child ()
10:nth-child ()
11:nth-last-child ()
12:nth-of-type (n)
13:only-child
14:first-letter
15:first-line
16:before
17:after
18:selection
UI status element pseudo-class selector
E:checked {attribute} matches all selected elements in the user interface (form form)
E:enabled {attribute} matches all available elements in the user interface (form form)
E:disabled {attribute} matches all elements in the user interface (form form) that are not available
E::selection {attribute} matches the part of the element that is selected or highlighted by the user
This is the end of the content of "what are the selectors of Css3". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!