E[attr|="value"] selector
This selector can match elements that have the attr attribute and the attribute value is "value" or starts with "value-". The code example is as follows:
php中文网
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
Of course, this selector can also be used in multiple combinations. , the code is as follows:
li[id|="ant"][title|="come"]{ color:red; }