Syntax parsing

3.2 Common parsing grammar

css selector

1, class selector

The class name

2, id selector

#id value

3, the tag selector

Label name

4, descendant selectors

Selector Selector 1 2

5, the sub-selector

The selector 1> selector 2

6, attribute selector

[Property name] # as long as the property name, will be selected

[Attribute name = attribute value] # as long as this attribute names and values ​​are equal, and will be selected

<h1 class="xxx yyy " ></h1>

[class="xxx yyy "]

[^ Attribute name = value]

[= Value & attribute name]

[Property name = value *]

7, group selector

The selector 1, 2 or selector

8, multiple conditional selector

Selector Selector 2 and 1

​ p[pro="xxx"]

Guess you like

Origin www.cnblogs.com/SkyOceanchen/p/12168287.html