×
HTML标签列表(字母排序)HTML标签列表(功能排序)HTML 全局属性HTML 事件属性HTML 画布HTML 音频/视频HTML 有效 DOCTYPESHTML 颜色名HTML 拾色器HTML 颜色混搭HTML 字符集HTML ASCIIHTML ISO-8859-1HTML 符号实体HTML URL 编码HTML 语言代码HTML 状态消息HTML GET/ POST方法Px、Em 换算工具键盘快捷键

HTML 标签

<!--...--><!DOCTYPE><a><abbr><acronym><address><applet><area><article><aside><audio><b><base><basefont><bdi><bdo><big><blockquote><body><br><button><canvas><caption><center><cite><code><col><colgroup><command><datalist><dd><del><details><dfn><dialog><dir><div><dl><dt><em><embed><fieldset><figcaption><figure><font><footer><form><frame><frameset><head><header><hgroup><h1><hr><i><iframe><img><input><ins><kbd><keygen><label><legend><li><link><map><mark><menu><meta><meter><nav><noframes><noscript><object><ol><optgroup><option><output><p><param><pre><html><progress><q><rp><rt><ruby><s><samp><script><section><select><small><source><span><strike><strong><style><sub><summary><sup><table><tbody><td><textarea><tfoot><th><thead><time><title><tr><track><tt><u><ul><var><video><wbr>

HTML <a> coords 属性


HTML <a> 标签HTML <a> 标签


实例

以下实例在 <a> 元素中使用 shape 和 coords 属性来创建图像地图:

<object data="planets.gif" alt="Planets" type="image/gif" usemap="#Map1">
<map name="Map1">
<a href="sun.htm" shape="rect" coords="0,0,82,126">太阳</a>
<a href="mercur.htm"shape="circle" coords="90,58,3">水星</a>
<a href="venus.htm" shape="circle" coords="124,58,8">金星</a>
</map>
</object>

尝试一下 »

浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

目前只有Firefox 和 Opera浏览器支持coords 属性。


定义和用法

HTML5 已不再支持 <a> 标签的 coords 属性。

coords 属性通常与 shape 属性一起使用,两个属性可以规定 <object>或 <img> 元素中链接的尺寸、形状和位置。

左上角的坐标是 0,0。

提示:如需创建能够在所有浏览器中运行的图像映射,请使用 <area> 元素。


语法

<a coords="value">

属性值

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

HTML <a> 标签HTML <a> 标签


分类导航

关注微信下载离线手册

bootwiki移动版 bootwiki
(群号:472910771)