什么是html map标签
发布时间:2020-07-10 16:21:22
来源:亿速云
阅读:67
作者:Leah
这期内容当中小编将会给大家带来有关什么是html map标签,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
map标签常用在为图像的某区域添加超链接,主要定义一个客户端图像映射,图像映射(image-map)指带有可点击区域的一幅图像。
作用:定义一个客户端图像映射。
说明:图像映射(image-map)指带有可点击区域的一幅图像。
注释:area 元素永远嵌套在 map 元素内部。area 元素可定义图像映射中的区域。中的 usemap 属性可引用 中的 id 或 name 属性(取决于浏览器),所以我们应同时向 添加 id 和 name 属性。
html map标签 示例
src="https://cache.yisu.com/upload/information/20200318/90/5764.jpg"
border="0" usemap="#planetmap"
alt="Planets" />
shape="circle"
coords="180,139,14"
href ="http://www.php.cn/example/html/venus.html"
target ="_blank"
alt="Venus" />
shape="circle"
coords="129,161,10"
href ="http://www.php.cn/example/html/venus.html"
target ="_blank"
alt="Mercury" />
shape="rect"
coords="0,0,110,260"
href ="http://www.php.cn/example/html/venus.html"
target ="_blank"
alt="Sun" />
注释:img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。
上述就是小编为大家分享的什么是html map标签了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注亿速云行业资讯频道。