您的位置:58脚本 > html 属性 HTML area coords 属性

html 属性 HTML area coords 属性

2023-04-21 10:32 HTML参考手册

html 属性 HTML area coords 属性

html 属性 HTML area coords 属性

html 属性

HTML <area> coords 属性

HTML area 标签参考手册 HTML <area> 标签

实例

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

<img src ="planets.gif" width="145" height="126" alt="Planets"
usemap="#planetmap">

<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.gif">
<area shape="circle" coords="90,58,3" alt="Mercury" href="merglobe.gif">
<area shape="circle" coords="124,58,8" alt="Venus" href="venglobe.gif">
</map>


浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流浏览器都支持 coords 属性。


定义和用法

coords 属性规定区域的 x 和 y 坐标。

coords 属性与 shape 属性配合使用,来规定区域的尺寸、形状和位置。

提示: 图像左上角的坐标是 "0,0"。


HTML 4.01 与 HTML5之间的差异


语法

<area coords="value">

属性值

描述
x1,y1,x2,y2 如果 shape 属性设置为 "rect",则该值规定矩形左上角和右下角的坐标。
x,y,radius 如果 shape 属性设置为 "circ",则该值规定圆心的坐标和半径。
x1,y1,x2,y2,..,xn,yn 如果 shape 属性设置为 "poly",则该值规定多边形各边的坐标。如果第一个坐标和最后一个坐标不一致,那么为了关闭多边形,浏览器必须添加最后一对坐标。


HTML area 标签参考手册 HTML <area> 标签

阅读全文
以上是58脚本为你收集整理的html 属性 HTML area coords 属性全部内容。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
相关文章
© 2024 58脚本 58jiaoben.com 版权所有 联系我们
桂ICP备12005667号-28 Powered by CMS