-1
我想將圖像映射轉換爲svg,因爲圖像映射不會根據瀏覽器大小更改而調整大小。 如何更改座標和標籤?如何在將imagemap轉換爲svg的同時更改座標?
<img id="image" src="ch01ch01.png" width="453" height="453" usemap="#map"/>
<map name="map" id="id_1">
<area class="notbutton" shape="poly" id=12 coords="172,227,181,224,183,213,189,201,195,193,199,190,199,184,126,93,135,93,123,79,103,96,84,117,68,140,58,162,51,186,48,201,47,214,135,219,130,227,148,227,147,225,151,227,149,223,153,227,153,221,156,225,157,214,160,202,166,190,174,179,176,177,174,174,191,176,192,192,189,189,180,200,174,212,172,224,172,227"
onmouseover=" Display_img(curr_base_id,'12')" onclick="change_BASE_ID('12',this.className)" onmouseout="Display_base_img()"/>
<area class="notbutton" shape="poly" id=11 coords="173,229,181,229,184,243,192,256,201,265,201,271,179,309,174,302,125,375,106,361,88,342,71,319,59,295,52,270,48,252,47,243,65,240,61,248,147,234,147,236,150,234,150,238,154,234,154,239,156,235,159,246,165,262,175,275,185,284,195,270,184,259,177,249,174,237,173,229"
onmouseover=" Display_img(curr_base_id,'11')" onclick="change_BASE_ID('11',this.className)" onmouseout="Display_base_img()"/>
</map>
你嘗試過這麼遠嗎?請包括您迄今爲止解決問題所做的工作摘要。 – sean
嗨,我已經嘗試了這個代碼爲我的形象。 http://jsfiddle.net/32rx6/2/但我的圖像寬度n高度不是100%。它是453 * 453,所以這對我不起作用。 – Karen
該代碼用於圖像映射。你做了什麼? SVG? –