把图像热区跟链接关联起来
由 Ghostzhang 发表于 2007-07-20 18:46
在《Sample XHTML 1.0 document》里看到图像热区也可以跟链接关联到一起,即点热区和点链接是一样的地址。看下具体的玩法。
正常的玩法:
- Result

- HTML
<img src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRQvhdnv0jPrvemdtnBh58ryzRJ2CcUUkM1o5hU1jHSHo-56OmY" alt="image" usemap="#map" height="100" width="100">
<div>
<map xml:lang="en" dir="ltr" id="map" class="map" title="map" name="map" lang="en">
<area href="#1" shape="rect" coords="0,0,50,50" alt="map1" title="map1">
<area href="#2" shape="rect" coords="50,0,100,50" alt="map2" title="map2">
<area href="#3" shape="rect" coords="0,50,50,100" alt="map3" title="map3">
<area shape="rect" coords="50,50,100,100" href="#4" alt="map4" title="map4">
</map>
</div>
关联链接:

- HTML
<img src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRQvhdnv0jPrvemdtnBh58ryzRJ2CcUUkM1o5hU1jHSHo-56OmY" alt="image" usemap="#map2" height="100" width="100">
<div>
<map xml:lang="en" dir="ltr" id="map2" class="map" title="map" name="map2" lang="en">
<ul>
<li><a href="#" shape="rect" coords="0,0,50,50">map1</a>
</li>
<li><a href="#" shape="rect" coords="50,0,100,50">map2</a>
</li>
<li><a href="#" shape="rect" coords="0,50,50,100">map3</a>
</li><li><a href="#" shape="rect" coords="50,50,100,100">map4</a>
</li>
</ul>
</map>
</div>