我有以下html:
<div class="A">
<img src="image1.png" width="100px" height="100px"/>
</div>
Run Code Online (Sandbox Code Playgroud)
在我的媒体查询css样式表中,我想用另一个(image2.png)替换该图像.
我需要编写什么css代码?
我尝试了以下方法:
.A img
{
background:url("image2.png") no-repeat;
}
Run Code Online (Sandbox Code Playgroud)
但这似乎不正确?