Zastępowanie obrazu (w tagu <img />) za pomocą css
Mam następujący html:
<div class="A">
<img src="image1.png" width="100px" height="100px"/>
</div>
W moim arkuszu stylów zapytań o media chciałbym zastąpić ten obraz innym (image2.png).
Jaki jest kod css, który muszę napisać?
Próbowałem:
.A img
{
background:url("image2.png") no-repeat;
}
Ale to nie wydaje się poprawne?