HTML <a> shape 属性
标签" href="tag-main.html"><main>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<html>
<picture>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
< template>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
HTML <a> shape 属性
实例
在 <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>
浏览器支持
目前只有Firefox 和 Opera 支持 shape 属性。
定义和用法
HTML5 不再支持 <a> 标签的 shape 属性。
shape 属性与 coords 属性配合, 可以规定 <object>或 <img>元素中链接的尺寸、形状和位置。
提示::如需创建能够在所有浏览器中运行的图像映射,请使用 <area> 元素!
语法
<a shape="value">
属性值
| 值 | 描述 |
|---|---|
| default | 规定全部区域。 |
| rect | 定义矩形区域。 |
| circle | 定义圆形。 |
| poly | 定义多边形区域。 |