带有可点击区域的图像映射:HTML <map> 标签
2016-04-08 13:34
603 查看
实例
带有可点击区域的图像映射:<img src="planets.jpg" border="0" usemap="#planetmap" alt="Planets" /> [code]<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>
[/code]
<html> <body> <p>请点击图像上的星球,把它们放大。</p> <img src="/i/eg_planets.jpg" border="0" usemap="#planetmap" alt="Planets" /> <map name="planetmap" id="planetmap"> <area shape="circle" coords="180,139,14" href ="/example/html/venus.html" target ="_blank" alt="Venus" /> <area shape="circle" coords="129,161,10" href ="/example/html/mercur.html" target ="_blank" alt="Mercury" /> <area shape="rect" coords="0,0,110,260" href ="/example/html/sun.html" target ="_blank" alt="Sun" /> </map> <p><b>注释:</b>img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。</p> </body> </html>
注释:img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。
相关文章推荐
- html中的单元格属性
- HTMl验证
- 点击table中的一行获取这一行中的其他数据
- XML和HTML常用转义字符
- VC7 HTML Dialog开发实例讲解
- Html特殊字符大全
- HTML转义字符大全(转)
- HTML 5中的文件处理之FileAPI(转载)
- html中form表单的enctype属性
- 看看什么是真正的瀑布流开发
- 1-HTML简介(标记、属性)
- 怎样通过FineReader将图像转换成HTML
- HTML
- HTML基础(四)
- HTML基础(三)
- 利用intent-filter和html超链接实现页面跳转
- HTML图片轮播代码
- HTML中的window对象和document对象详解
- 删除HTML元素
- 增加HTML元素