Blogger Information
Blog 4
fans 0
comment 0
visits 5295
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
HTML 图片定位
计算机的博客
Original
1857 people have browsed it

coords 属性与 shape 属性配合使用,来规定区域的尺寸、形状和位置.

用图像热点设置。

有效利用<img>标签的usemap属性,给图片划分一个地图,设定图片热点(即给图片分区,但不是切割,图片还是完整的,只是用代码将图片分成几个部分),然后给热点设定相应的链接。

usemap属性的用法——使用时:<img src="test.gif" usemap="#Map">这里的#后面的Map为我们自定义的图像地图的名称,可以任意设定。

针对你的问题,具体代码如下:
<div>
   <img usemap="#Map" src="quarters.gif" style="width:200px;height:200px;" alt=""  ismap="ismap" />
   <map name="Map">
       <area shape="rect" coords="0,0,100,100" href ="topleft.html" alt="topleft.html" />
       <area shape="rect" coords="100,0,200,100" href ="topright.html;" alt="topright.html;" />
       <area shape="rect" coords="0,100,100,200" href ="bottom-left.html" alt="bottom-left.html" />
       <area shape="rect" coords="100,100,200,200" href ="bottomright.html" alt="bottomright.html" />
   </map>
</div>

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post