定义和用法
定义一个客户端图像映射。图像映射(image-map)指带有可点击区域的一幅图像。
所有主流浏览器都支持 标签。
注释:area 元素永远嵌套在 map 元素内部。area 元素可定义图像映射中的区域。
中的 usemap 属性可引用 中的 id 或 name 属性(取决于浏览器),所以我们应同时向 添加 id 和 name 属性。
实例
带有可点击区域的图像映射:
请点击图像上的星球,把它们放大。
img src = " /i/eg_planets.jpg " border = " 0 " usemap= " #planetmap " alt = " Planets " /> " 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 " />注释:img 元素中的 " usemap " 属性引用 map 元素中的 " id " 或 " name " 属性(根据浏览器),所以我们同时向 map 元素添加了 " id " 和 " name " 属性。
查看更多关于HTML<map>标签-创建带有可点击区域的图像映射的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did101885