我有一個HTML地圖應用光標的CSS區地圖
#world {
position: relative;
cursor: url("http://cur.cursors-4u.net/cursors/images4/cur395.gif"), url("http://i50.tinypic.com/21b9fso.gif"), auto;
}
area {
cursor: auto;
}
<div id="world">
<map id="world">
<area shape="circle" alt="Africa" title="Africa" coords="682,462,97" href="AllItems.aspx" target="_self" onmouseover="afr.style.visibility='visible'; afr.src='http://irvingglobalstudies.wikispaces.com/file/view/Africa.png/174406561/284x300/Africa.png';"
onmouseout="afr.style.visibility='hidden';" />
<area shape="circle" alt="Americas" title="Americas" coords="228,198,123" href="AllItems.aspx" target="_self" onmouseover="ame.style.visibility='visible'; ame.src='https://www.walmartethics.com/images/landingpagemap/americas.png';" onmouseout="ame.style.visibility='hidden';"
/>
<area shape="circle" alt="Asia/Pacific" title="Asia/Pacific" coords="1110,412,122" href="AllItems.aspx" target="_self" onmouseover="asi.style.visibility='visible'; asi.src='http://www.awlgrip.com/PublishingImages/AsiaPacific.png';" onmouseout="asi.style.visibility='hidden';"
/>
<area shape="circle" alt="Europe" title="Europe" coords="627,136,98" href="AllItems.aspx" target="_self" onmouseover="eur.style.visibility='visible'; eur.src='http://scrubs.co.uk/_img/map-europe.png';" onmouseout="eur.style.visibility='hidden';" />
</map>
<img alt="Africa" style="position:absolute;top:559px;left:779px;visibility:hidden;" id="afr" src="http://irvingglobalstudies.wikispaces.com/file/view/Africa.png/174406561/284x300/Africa.png" />
<img alt="Americas" style="position:absolute;top:321px;left:351px;visibility:hidden;" id="ame" src="https://www.walmartethics.com/images/landingpagemap/americas.png" />
<img alt="Asia/Pacific" style="position:absolute;top:534px;left:1232px;visibility:hidden;" id="asi" src="http://www.awlgrip.com/PublishingImages/AsiaPacific.png" />
<img alt="Europe" style="position:absolute;top:234px;left:725px;visibility:hidden;" id="eur" src="http://scrubs.co.uk/_img/map-europe.png" />
<img alt="world map" src="https://upload.wikimedia.org/wikipedia/commons/f/fc/No_colonies_blank_world_map.png" usemap="#world" />
</div>
<img alt="Ta Da" src="http://i3.kym-cdn.com/entries/icons/original/000/008/119/1353379_700b.png" />
光標是正確在地圖本身時,並在tada.png時正確還原,但光標不按預期方式懸停在區域上時更改。 當光標位於地圖圈上時,我應該提及哪些元素來更改光標?
你可以分享演示鏈接? –
我創建了http://jsfiddle.net/FiveBs/5w5jfxgz/,但由於公司安全設置而看不到結果。 –
這裏光標在整個頁面中是否一樣?我沒有得到,PLZ解釋 –