原文来自:http://www.cnblogs.com/firstdream/archive/2012/01/30/2331663.html
在html
的img属性里只显示图片的部分区域(矩形,给出开始点和结束点),其他部份不显示,也不要拉伸
方法1:
<div
"position:absolute;left:0px;
top:0px;width:600px;
<img
">
</div>
rect
依据上-右-下-左的顺序提供自图片左上角为(0,0)坐标计算的四个偏移数值,其中任一数值都可用auto替换,即此边不剪切
你需要rect
startX
方法2:
也可以这样写:
<img
">
存在的弊病:采用绝对定位,使定位困难
.fleft_tp{background:url(/resource/moneychat/style/images/quamnet/bg_head_home2.jpg)
no-repeat
fixed
360px
0px;overflow:visible;width:710px;height:90px;}