Today we will tell you about the use of the property selector and pseudo-class selector and related links and differences, let's give you a small example.
Property selector:
[attr~= "value"] word word space word Word must value valid
[attr|= "value"] value beginning or value-word
Attention:
The choice of attributes is very difficult to judge the selection element by the regular expression, the efficiency is higher
Pseudo-Class selectors:
: Before
: After
: Lang (val) val/val-words
: Nth-child (N) n calculates the odd cardinality even the even number starting from 1
: the Nth-of-type (n) selector matches each element of the nth child element of a particular type that belongs to the parent element.
<!doctype html>
Related reading:
How to hide the contents of an overflow div
What are the techniques of CSS layout?
How to set the font style in CSS