2012-08-09 5 views
48

Safari(またはChromeまたはFirefox)のiOS用のリンクをクリック(タッチ)すると、リンクの背景に灰色の背景が表示されます)。 CSSを使用してこの機能を削除する方法はありますか?ios safari/chrome/firefoxでクリックしたリンクの灰色の背景を削除する

以下の例の画像をご覧ください。

enter image description here

+0

completely-ハイライトを削除したい場合は、リンクやCSSについて話しているとき、私は本当にサファリのiOSについての考えを持っていないが、 、あなたは最高の背景色を変更すると思います:アクティブ –

+0

は本当に有益でした... – Chetan

答えて

130

Webkitのは、そのための具体的なスタイルプロパティを持っている:-webkit-tap-highlight-colorを。コピー

http://davidwalsh.name/mobile-highlight-color -

/* light blue at 80% opacity */ 
html { 
    -webkit-tap-highlight-color: rgba(201, 224, 253, 0.8); 
} 

/* change it for a div that has a similar background-color to the light blue tap color */ 
.blueDiv { 
    -webkit-tap-highlight-color: rgba(251, 185, 250, 0.9); 
} 

あなたは

.myButton { 
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 
} 
+0

驚くべき、私のIOSタップの背景の問題 – Simon

+0

そのようなちょっとした宣言。ありがとう@ pk-nb – danMad

関連する問題