The selector added by css3 and the selector added by css3.
New selector in css3
1. Attribute selector:
E [attr] As long as there is an attribute name
E [attr = value] attribute name = Attribute value
E [attr ~ = Blue] the entire blue word can be included.
E [attr ^ = c] starting with the letter c
E [attr $ = B] ending with the letter B
E [attr * = a] only needs to contain the letter "".
E [attr | = z] As long as it starts with z-or is z
Ii. Structure pseudo-class selector:
E: nth-child (n) nth subnode
Div: nth-child (odd) odd row
Div: nth-child (even) even row
Div: a multiple of nth-child (2n) 2
E: nth-last-child (n) Reciprocal n
Iii. Others:
E: empty Element
E: first-child: the first subnode is equivalent to E: nth-child (1 ).
E: last-child: the first to last, which is equivalent to E: nth-last-child (1 ).
* Note that no other sibling node exists.
E: the style of the target anchor element.
Div: target {width: 100px ;}
<Div id = "div1"> </div>
As long as the anchor has # div1, the above target style will take effect.
E: disabled form Element setting disabled
E: form elements that can be clicked by enabled
E: checked indicates the checkbox or radio that has been selected.
Add a pseudo class for text:
E: first-line first line
E: first-letter first word
E: When selection selects text
E: add something before the before tag and use it with content.
E: add things behind the after E tag
E: before E: after single quotes can also be used
E: not (s) does not include s
H1: not (. red) exclude h1 elements whose class is red.
E ~ F brother node after F E