Is it possible to set the src
attribute value in CSS? At present, what I am doing is:
<img src="https://stackoverflow.com/questions/2182716/pathTo/myImage.jpg"/>
and I want it to be something like this
<img class="myClass"/>
.myClass {
some-src-property: url("https://stackoverflow.com/questions/2182716/pathTo/myImage.jpg");
I want to do this without using the background
or background-image:
properties in CSS.