本文摘自PHP中文网,作者藏色散人,侵删。
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标签 示例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!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标签怎么用的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
Html legend标签怎么用
br在Html里是什么
Html audio标签怎么用
js怎么去掉Html标签
Html滚动条样式如何设置
Html中js是什么
Html有什么特点
如何使用css去掉a标签的下划线?(代码详解)
详解前端在Html页面之间传递参数的方法
Html a标签是怎么使用的?Html a标签的使用总结
更多相关阅读请进入《Html》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » html area标签怎么用