当前位置: 代码迷 >> Web前端 >> 关于图片暖区
  详细解决方案

关于图片暖区

热度:121   发布时间:2012-10-16 09:57:37.0
关于图片热区
HTML <map> 标签
1.定义和用法
定义一个客户端图像映射。图像映射(image-map)指带有可点击区域的一幅图像。
2.实例
带有可点击区域的图像映射:
<img src="planets.jpg" border="0" usemap="#planetmap" alt="Planets" />

<map name="planetmap" id="planetmap">
  <area shape="circle" coords="180,139,14" href ="venus.html" alt="Venus" />
  <area shape="circle" coords="129,161,10" href ="mercur.html" alt="Mercury" />
  <area shape="rect" coords="0,0,110,260" href ="sun.html" alt="Sun" />
</map>

提示和注释:
注释:area 元素永远嵌套在 map 元素内部。area 元素可定义图像映射中的区域。
注释:<img>中的 usemap 属性可引用 <map> 中的 id 或 name 属性(取决于浏览器),所以我们应同时向 <map> 添加 id 和 name 属性。

实际操作时我们借助dreamweaver进行编辑相当方便,切换至页面编辑,点击图片,左下角会出现热区的编辑区域....
  相关解决方案