I am trying to apply some rules on a set of img elements whose id begins with "sth". I know how to select them:
img [id^=sth]
But is there a way to use this image specific id inside the selector? In other words, can I somehow do this:
img [id^=sth] {
src: id;
}
srcis not a valid CSS property of<img>, so I don't think your specified example can work.src,name,title,altare all not valid CSS property of<img>(nameis even an obsoleted HTML attribute as of HTML5), so there's really not much you can do.