Is it possible to set css properties by id prefix?
Example
Set for all divs with ids starting obj_
a black background color.
I开发者_StackOverflow社区s this possible just using CSS ?
EDIT
Ups I wrote class name in the title byt I ment Id name..
Using the CSS3 attribute-starts-with selector:
div[id^="obj_"] {
background: #000
}
This will work in all modern browsers.
精彩评论