<AREA>

イメージマップのそれぞれのリンク領域とリンク先を指定する

ショートカット

形式

<AREA href="URL" shape="" coords="範囲" alt="代替テキスト">

タグの形式

説明

参考HTMLソース

<IMG src="○○.gif" width="129" height="80" alt="サンプル" border="0" usemap="#map1">
<MAP name="map1">
<AREA href="○○.html" shape="circle" alt="" coords="85,30,20">
</MAP>

はじめに、<IMG>に、usemap属性で、マップの名前をつける。

次に、<MAP name="マップの名前"> 〜 </MAP> で、イメージマップを定義。

そして、実際のリンク機能をひとつひとつずつ <AREA>タグとその属性で指定。

重要な属性

shape="" coords="座標"

<AREA shape="rect" coords="a,b,c,d">

<AREA shape="circle" coords="a,b,c">

<AREA shape="poly" coords="A,a,B,b,C,c,A,a">

href="URL"

alt="代替テキスト"

その他リンクに関する属性

一般属性

使用例

HTMLソース

<IMG src="sample.gif" width="129" height="80" 
alt="サンプル" border="0" usemap="#map1">

<MAP name="map1">
<AREA href="○○.html" shape="rect" alt="四角" coords="150,0,190,130">
<AREA href="○○.html" shape="circle" alt="" coords="95,65,40">
<AREA href="○○.html" shape="poly" alt="多角形" coords="5,45,60,125,5,125,5,45">
</MAP>

解説

サンプル 四角 円 多角形

このサイト内で使用している画像(バナー除く)及びテキストの無断複製・転載を禁じます
Copyright © 2006 KURAGEYA, All right reserved.

SEO [PR] おまとめローン Windows7 冷え性対策 動画 掲示板 レンタルサーバー ライブチャット SEO