复制代码代码如下:
<div style=”width: 800px; height: 100px; overflow: hidden;”>
<img style=”margin-top:-25px;” src=”http://huoche.7234.cn/images/jb51/cna4koeaxf1.jpg” alt=”hult” />
</div>
原图:
复制代码代码如下:
<div style=”width: 800px; height: 100px;”>
<img src=”http://huoche.7234.cn/images/jb51/cna4koeaxf1.jpg” alt=”hult” />
</div>
overflow: hidden //这个样式是说,如果图片宽,高都超过了div的高宽,超出的部分就隐藏
margin-top:-25px //把图片高度裁剪掉25px
新闻热点
疑难解答