单击链接检查图像
当在移动视图中,前面的图像应该被隐藏。我用媒体查询编写了代码,但是什么都没有发生。
null
@media (max-width:600px) {
img#abc {
display: hidden;
}
}
.pic3 {
position: relative;
top: 60px;
left: 10%;
height: 550px;
width: 500px;
}
.pic4 {
position: absolute;
left: 40%;
bottom: 8%;
top: 300px;
height: 400px;
width: 350px;
}
<img class="pic3" src="Images/3rd pic.jpg" style="top:auto; margin-top:100px">
<img id="abc" class="pic4" src="Images/4th pic.jpg">
null
在媒体
图像样式上,应将显示:隐藏;
替换为显示:无
。display:hidden;
不是display
css属性的属性。