Web三件套(经验贴)img里面添加热区链接的实际例子

我们打开新浪的网站www.sina.cn,可用看到如图的页面:

在这里插入图片描述
查看其源代码,发现这个图添加了热区链接

	<!-- Map -->
	<div id="map">
		<img src="//ui.sina.com/assets/img/www/worldmap.jpg" alt="" name="map1" width="775" height="248" border="0" usemap="#Map1" id="Map1" />

<map name="Map1" id="">
<area shape="rect" coords="173,81,299,137" href="https://home.sina.com" target="_self" alt="北美新浪" title="北美新浪" onclick="_S_uaTrack('global_guide', 'us');" />
<area shape="rect" coords="468,81,572,129" href="http://www.sina.com.cn" target="_self" alt="北京新浪" title="北京新浪" onclick="_S_uaTrack('global_guide', 'beijing');" />
<area shape="rect" coords="482,145,578,184" href="http://www.sina.com.hk" target="_self" alt="香港新浪" title="香港新浪" onclick="_S_uaTrack('global_guide', 'hongkong');" />
<area shape="rect" coords="658,123,755,162" href="http://www.sina.com.tw" target="_self" alt="台湾新浪" title="台湾新浪" onclick="_S_uaTrack('global_guide', 'taipei');" />
</map>
	</div>

热区区域为矩形。

猜你喜欢

转载自blog.csdn.net/qq_44861675/article/details/108311204