html map标签用于客户端图像映射。图像映射指带有可点击区域的一幅图像。因为中的 usemap 属性可引用
html map标签怎么用?
作用:定义一个客户端图像映射。
说明:图像映射(image-map)指带有可点击区域的一幅图像。
立即学习“前端免费学习笔记(深入)”;
注释:area 元素永远嵌套在 map 元素内部。area 元素可定义图像映射中的区域。中的 usemap 属性可引用
html map标签 示例
<!DOCTYPE html> <html> <body> @@##@@ <map name="planetmap" id="planetmap"> <area shape="circle" coords="180,139,14" href ="http://www.php.cn/example/html/venus.html" target ="_blank" alt="Venus" /> <area shape="circle" coords="129,161,10" href ="http://www.php.cn/example/html/venus.html" target ="_blank" alt="Mercury" /> <area shape="rect" coords="0,0,110,260" href ="http://www.php.cn/example/html/venus.html" target ="_blank" alt="Sun" /> </map> <p><b>注释:</b>img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。</p> </body> </html>
输出:
以上就是html map标签怎么用的详细内容,更多请关注php中文网其它相关文章!
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号