- 0133技术站
- 联系QQ:88526
- QQ交流群

- 微信公众号

HTML5 不再支持 <a> 标签的 shape 属性。
此属性用于定义用于创建图像映射的超链接的区域,shape 属性与 coords 属性配合, 可以规定 <object>或 <img>元素中链接的尺寸、形状和位置。
提示::如需创建能够在所有浏览器中运行的图像映射,请使用 <area> 元素!
目前只有Firefox 和 Opera 支持 shape 属性。
<a shape="value">
值 | 描述 |
---|---|
default | 规定全部区域。 |
rect | 定义矩形区域。 |
circle | 定义圆形。 |
poly | 定义多边形区域。 |
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p>点击太阳或其他行星,注意变化:</p> <img src="http://ss.0133.cn/upload/image/885/902/932/1553322045901285.gif" width="145" height="126" alt="Planets" usemap="#planetmap"> <map name="planetmap"> <a shape="rect" coords="0,0,82,126" alt="Sun" href="https://public.xp.cn/down/course_demo/html/area_tabs/sun.htm"></a> <a shape="circle" coords="90,58,3" alt="Mercury" href="https://public.xp.cn/down/course_demo/html/area_tabs/mercur.htm"></a> <a shape="circle" coords="124,58,8" alt="Venus" href="https://public.xp.cn/down/course_demo/html/area_tabs/venus.htm"></a> </map> </body> </html>
点击 "运行实例" 按钮查看在线实例
推荐手册