<div class="one">
<div class="two">
<img src="" alt="" />
</div>
</div>
.one{
width: 1000px;
height: 540px;
margin: 0 auto;
position: relative;
}
.two{
width: 1920px;
height: 540px;
position: absolute;
top: 0;
left: -460px;
overflow: hidden;
text-align: center;
}其中图片大小:1920x500,css这样写在pc端正常,当分辨率小于1920的时候,大于分辨率的部分自动隐藏,但是在移动端却只是把整张1920的图片缩小了,而没有隐藏多余的部分。求赐教!
最佳答案