Universal sibling selector
This selector has a wider matching range than adjacent sibling selectors, and there is no "adjacent" restriction.
E ~ F
The above is the format for creating a universal sibling selector. E and F must have the same parent element, and the F element is behind the E element. The code example is as follows:
li{color: blue}
.antzone ~ li{
color:red;
}
head>
- php中文网一
- php中文网二
- php中文网三
- php中文网四< ;/li>
The above code can replace the antzone The font of all li elements is set to red.