html area标签怎么用

html area标签怎么用,第1张

html area标签怎么用 html area标签用于带有可点击区域的图像映射,area元素总是嵌套在<map>标签中。<img>标签中的usemap属性与map元素name属性相关联,创建图像与映射之间的联系。

html area标签怎么用?

作用:带有可点击区域的图像映射

说明:

<img> 中的 usemap 属性可引用 <map> 中的 id 或 name 属性(由浏览器决定),所以我们需要同时向 <map> 添加 id 和 name 两个属性。

注释:

<area> 标签定义图像映射中的区域(注:图像映射指得是带有可点击区域的图像)。area 元素总是嵌套在 <map> 标签中。<img> 标签中的 usemap 属性与 map 元素 name 属性相关联,创建图像与映射之间的联系。

html area标签 示例

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<img src="http://www.php.cn/tpl/Index/Static/img/banner7.jpg" border="0" usemap="#studymap" alt="study" />
<map name="studymap" id="studymap">
    <area shape="circle" coords="180,139,14" href ="http://www.php.cn"  />
    <area shape="circle" coords="129,161,10" href ="http://www.php.cn"  />
    <area shape="rect" coords="0,0,110,260" href ="http://www.php.cn"  />
</map>
</body>
</html>

以上就是html area标签怎么用的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/693354.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-22
下一篇 2022-04-22

发表评论

登录后才能评论

评论列表(0条)

保存