方法一:
<div style="position:absolute; top:0px;; left:0px; width:135px; height:56px; clip:rect(34px 135px 91px 1px);"><img src="webIndex_01s.gif" /></div>
上面代码中,div中的属性都很重要。(sy,ex,ey,sx)

方法二:
<style>
span {
display: block;//一定要有
background-image:url(webIndex_01s.gif);
background-repeat: no-repeat;
background-position: -336px -33px;//要显示的区域坐标,左上角为原点
width: 200px;//显示区域的宽和高
height: 25px;
}
</style>
<span></span>

方法三:
<img src="webIndex_01s.gif" style="position:absolute; top:120px; left:0px; clip:rect(34px 135px 91px 1px);" />
注意:图片的大小必须和大图的尺寸一样,而不是显示区域的尺寸

相关文章:

  • 2021-06-13
  • 2022-12-23
  • 2021-08-06
  • 2021-11-05
  • 2022-12-23
  • 2021-07-25
  • 2021-10-19
猜你喜欢
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
相关资源
相似解决方案