HTML a shape attribute
Examples
Create an image map using the shape and coords in <a> elements:
<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>
<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>
try it"
Browser Support
At present, only Firefox and Opera support shape properties.
Definition and Usage
HTML5 is no longer supported shape attribute <a> tag.
shape attribute coords attribute with, you can specify <object> or <img> element links the size, shape and location.
Tip:: To create an image map that can run in all browsers, use the <area> element!
grammar
<a shape="value">
Property Value
value | description |
---|---|
default | Provisions of the entire region. |
rect | Defined rectangular area. |
circle | The definition of a circle. |
poly | Define the polygon area. |