[問題] Image map 的 CSS style

看板Web_Design作者 (消失)時間14年前 (2011/08/24 13:54), 編輯推噓0(006)
留言6則, 2人參與, 最新討論串1/1
想請問 Image map 內要怎麼判斷有onclick的範圍再給pointer的滑鼠游標? document.write('<td height="29" colspan="2" align="center" valign="middle">'); document.write('<img src="xxx.gif" width="186" height="162" usemap="#Control" style="cursor:pointer;"/>'); document.write('<map name="Control">'); document.write('<area shape="POLYGON" coords="xxxxx" id="Up" alt="move" onclick="Function(3,3);" />'); 因為某些判斷的關係,所以必須要使用到document.write的方式 而如果我把有area的地方也加上 href="#" 會變成點下去時候會出現邊框 CSS要怎麼做才能讓有onclick的範圍再出現pointer的滑鼠游標? 其他沒有作用範圍則是 default -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.42.52.187

08/24 14:48, , 1F
這跟你上次問的問題很雷同,對map area用css設置cursor即可
08/24 14:48, 1F

08/24 14:50, , 2F
如果你真的不想下href屬性的話......
08/24 14:50, 2F

08/24 15:10, , 3F
是因為受到document.write影響嗎?
08/24 15:10, 3F

08/24 15:11, , 4F
我有先試過簡單的在每個area元素內加上style="cursor:po
08/24 15:11, 4F

08/24 15:11, , 5F
不過無效
08/24 15:11, 5F

08/24 15:20, , 6F
因為href會在該區域旁邊出現白線,似乎不太漂亮
08/24 15:20, 6F
文章代碼(AID): #1EL980bS (Web_Design)