php map添加元素,html map标签怎么用

html map标签用于客户端图像映射。图像映射指带有可点击区域的一幅图像。因为中的 usemap 属性可引用 中的 id 或 name 属性(取决于浏览器),所以我们应同时向 添加 id 和 name 属性。

cd7e132dc1c4e38356c31974faf62055.png

html map标签怎么用?

作用:定义一个客户端图像映射。

说明:图像映射(image-map)指带有可点击区域的一幅图像。

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

html map标签 示例

src="https://img.php.cn/upload/article/000/005/656/5af270fd37755429.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" 属性。

输出:

80dad1feda73c1dd6ea6c37887854496.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值