2013-01-03 10 views
4

我嘗試過每種方法嘗試在按圖像的圖像地圖區域時刪除高光。我有搜索谷歌時間和一次又一次,並添加了我可以找到的所有CSS代碼,希望它會幫助..但它似乎並不。通過PhoneGap在Android 4.x應用程序中刪除圖像地圖區域的高光構建

的一個例子就是我講: android tablet

我已經加入:

-webkit-user-modify: read-write-plaintext-only; 
border:none; 
outline: 0; 
-webkit-tap-highlight-color: rgba(255, 255, 255, 0); 
-khtml-user-select: none; 
-o-user-select: none; 
-moz-user-select: none; 
-webkit-user-select: none; 
user-select: none; 

* { 
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 
cursor: none !important; 
-webkit-user-modify: read-write-plaintext-only; 
-khtml-user-select: none; 
    -o-user-select: none; 
    -moz-user-select: none; 
    -webkit-user-select: none; 
    user-select: none; 
outline:none; 
border: none; 
} 

img{ 
    -khtml-user-select: none; 
    -o-user-select: none; 
    -moz-user-select: none; 
    -webkit-user-select: none; 
    user-select: none; 
-webkit-user-modify: read-write-plaintext-only; 
outline:none; 
border: none; 
border-style: none; 
    } 

body, textarea:focus, input:focus, area:focus{ 
    outline:none; 
    border: none; 
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0); 
    -khtml-user-select: none; 
    -o-user-select: none; 
    -moz-user-select: none; 
    -webkit-user-select: none; 
    user-select: none; 
    -webkit-user-modify: read-write-plaintext-only; 
} 

a{ 
    outline:none !important; 
    border: none !important; 
} 

a img 
{ 
    border:none; 
    outline:none; 
} 

area{ 
outline:none; 
border: none; 
-webkit-tap-highlight-color: rgba(255, 255, 255, 0); 
-khtml-user-select: none; 
    -o-user-select: none; 
    -moz-user-select: none; 
    -webkit-user-select: none; 
    user-select: none; 
    -webkit-user-modify: read-write-plaintext-only; 
} 

#map { 
outline:none; 
border: none; 
-webkit-tap-highlight-color: rgba(255, 255, 255, 0); 
-khtml-user-select: none; 
    -o-user-select: none; 
    -moz-user-select: none; 
    -webkit-user-select: none; 
    user-select: none; 
    -webkit-user-modify: read-write-plaintext-only; 
} 

<img height="1024" src="img/MM.png" usemap="#MM_map" width="768" hidefocus="true"> 
<area coords="35,116,349,225" href="#HULU" id="HULU_id" onclick="$('#HULU').click();" shape="rect" style="border: none;" onfocus="blur();"> 
+0

嘗試捕捉onblur事件和通話e.preventDefault()?它適用於一些非移動瀏覽器 - 現在沒有電話來測試。 –

+0

http://stackoverflow.com/questions/8880627/webkit-tap-highlight-color-not-applied-to-area-tag試着看看這個話題,可能有解決您的問題。 – Pilatus

+0

@StealthRT:您是否找到解決問題的方案?你介意分享嗎? – Etienne678

回答

0

我可以預防的唯一方式就是通過捕捉ontouchend事件,並通過返回防止默認瀏覽器行爲對處理程序錯誤。

使用jQuery:

$("map area").on("touchend", function() { 
    return false; 
}); 
0

簡單方法。經過驗證。在Android Cordova應用程序中再次使用它,現在甚至。

img[usemap], map area { 
    outline: none; 
} 

享受

相關問題