HTML <area> 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 <area> shape 属性
实例
带有可点击区域的图像映射:
<img src ="planets.gif" width="145" height="126" alt="Planets"
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
浏览器支持
所有主流浏览器都支持 shape 属性
定义和用法
shape 属性指定了区域的形状。
shape 属性与 coords 属性配合,可以规定区域的尺寸、形状和位置。
HTML 4.01 与 HTML5之间的差异
NONE.
语法
<area shape="default|rect|circle|poly">
属性值
| 值 | 描述 |
|---|---|
| default | 规定全部区域。 |
| rect | 定义矩形区域。 |
| circle | 定义圆形。 |
| poly | 定义多边形区域。 |