129" href ="https://www.baidu.com/s?wd=%e5%85%83%e6%97%a6sa=
标签:
一、含义带有可点击区域的图像映射
二、浏览器撑持情况所有主流浏览器都撑持
三、注意事项area 元素永远嵌套在 map 元素内部。area 元素可界说图像映射中的区域。
<img>中的 usemap 属性可引用 <map> 中的 id 或 name 属性(取决于浏览器),所以我们应同时向 <map> 添加 id 和 name 属性。
四、属性id 必填 为 map 标签界说独一的名称。
name 可选 为 image-map 规定的名称。
五、实例<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>map 带有可点击区域的图像映射</title> <style> #lg{ text-align: center; } </style> </head> <body> <div id="lg"> <img hidefocus="true" class="index-logo-src" src="https://www.baidu.com/img/2019dong_33c09d45f5e85ae961a3852d8769f124.gif" width="270" height="129" usemap="#mp"> <map name="mp"> <area style="outline:none;" hidefocus="true" shape="rect" coords="0,0,270,129" href="https://www.baidu.com/s?wd=%e5%85%83%e6%97%a6&sa=ire_dl_gh_logo&rsv_dl=igh_logo_pcs" target="_blank" title="再见2019,,你好2020"> </map> </div> </body> </html>
六、效果【html】百度经常使用的 map标签
温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/32314.html