该图像仅在 chrome 中基于浏览器宽度进行缩放,但在 IE 和 Mozilla Firefox 中不起作用。thumb img 在所有浏览器中都可以使用,但只有 .play img max-width 不起作用这是我的 HTML
<div class="contai">
<div> <img src="1.png" style="max-width:100%" /></div>
<div class="thumb">
<img src="2.jpg" />
<div class="play"> <img src="videoImagePlay.png" /></div>
</div>
</div>
CSS
.contai{
width:100%;
}
.thumb{
border: 1px solid rgb(226, 226, 226);
position:relative; float:left; width:38%
}
.thumb img{
max-width:100%
}
.play{
position:absolute; top:30%; left:35%
}
.play img{
max-width:50%
}