Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

is there a way to combine CSS2 Attribute Selectors like tr[id^="foo" AND id$="bar"], so it selects all <tr id="foo_something_bar"> but not <tr id="foo_something"> or <tr id="something_bar">

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
626 views
Welcome To Ask or Share your Answers For Others

1 Answer

The same way you combine any selectors.

tr[id^="foo"][id$="bar"]

Those two substring matching selectors, however, are being introduced in the CSS 3 draft. They are not CSS 2.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...