2012-09-28 27 views
3

我想在我的圖像上設置一個地圖區域,但我希望它是一個八角形,所以我真的需要看看我正在繪製什麼。我需要看到一個HTML圖像地圖區域

不幸的是,我無法設計區域標籤的樣式,因此我可以看到映射的發生位置。這使我很難畫出這些區域,每次我都必須用鼠標跟隨它,以知道它從哪裏開始以及它在哪裏結束。

有沒有更好的方法?我發佈這個矩形的例子只是爲了保持簡單,我只是想通過插件或任何東西來看它。

<img src="img/myimg.png" usemap="#mapid" /> 
<map id="mapid" name="mapid"> 
<area id="myarea" shape="rect" coords="960, 0, 600, 500" href="#"/> 
</map> 
+0

我認爲有各種工具可以爲您提供一個GUI,您可以在其中定義圖像映射區域。即使您只想將其可視化,也可以使用這樣的工具。 – ThiefMaster

+0

可能重複[如何可視化/調試圖像?](https://stackoverflow.com/questions/1998866/how-to-visualise-debug-an-imagemap) – Geoff

回答

3

有許多工具,爲您繪製座標,下面有四個,我通常做的。

  1. 如果使用MS Windows,MS Paint會在狀態欄上顯示座標。
  2. 使用的在線工具,例如http://www.image-maps.com/
  3. 使用一個編輯器,例如Adobe Dreamweaver的
  4. 使用Firebug(http://getfirebug.com/

希望幫助:)

+0

FireBug添加。謝謝:) –

+0

我同意你的觀點,即Dreamweaver有時是越野車,並可能大塊HTML代碼,我發現它有時令人討厭。也許在線工具是一個更好的方式,但你必須忍受由於廣告故意的等待時間:) –

+0

螢火蟲真的這麼做!? –

0

我用的是以下網站獲取座標

http://imagemap-generator.dariodomi.de/

<map name="planetmap"> 

<area alt="facebook" coords="334,280,41" shape="circle" href="https://www.facebook.com/" target="_blank" /> 

<area alt="Twitter" coords="438,280,41" shape="circle" href="https://twitter.com/" target="_blank" /> 

<area alt="Gogle Plus" coords="541,280,39" shape="circle" href="https://plus.google.com/" target="_blank" /> 

<area alt="linkedin" coords="645,280,39" shape="circle" href="https://in.linkedin.com/" target="_blank" /> 

<area alt="youtube" coords="751,280,41" shape="circle" href="https://www.youtube.com/" target="_blank" /> 
</map> 

爲了您更好的,我給來自有一個參考的鏈接找到 什麼是HTML圖像映射,以及我們如何使用它

Image map details

0

您可以將該區域包裹在一個範圍內並對其進行設計以獲得高度,寬度,背景和位置。