반응형
iOS Safari / Chrome / Firefox에서 클릭 한 링크에서 회색 배경 제거
iOS 용 Safari (또는 크롬 또는 파이어 폭스)에서 링크를 클릭 (터치)하면 링크 뒤에 회색 배경이 표시됩니다 (누르고있는 동안에 만). CSS를 사용하여이 기능을 제거하는 방법이 있습니까?
아래 예제 이미지를 참조하십시오.
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);
}
최신 버전의 iOS는 어떤 이유로 RGBA 색상을 무시합니다.
이를 제거하려면 다음을 사용해야했습니다.
-webkit-tap-highlight-color: transparent;
여기에 설명 된대로 : https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color
반응형
'Development Tip' 카테고리의 다른 글
인 텐트를 통해 SMS 보내기 (0) | 2020.11.16 |
---|---|
html 요소에 첨부 된 이벤트를 어떻게 볼 수 있습니까? (0) | 2020.11.16 |
HttpClient 헤더를 추가하면 일부 값이 포함 된 FormatException이 생성됩니다. (0) | 2020.11.16 |
.sh 파일이란 무엇입니까? (0) | 2020.11.16 |
ASP.NET MVC에서 이미지 주위에 Html.ActionLink를 만드시겠습니까? (0) | 2020.11.16 |