문제상황
not hover
hover
위의 상태가 정상인데
touch event가 발생한 경우
hover 상태가 유지되는 문제 발생
해결
How to remove/ignore :hover css style on touch devices
I want to ignore all :hover CSS declarations if a user visits our website via touch device. Because the :hover CSS does not make sense, and it can even be disturbing if a tablet triggers it on clic...
stackoverflow.com
@media (hover: hover) and (pointer: fine) {
a:hover { color: red; }
}
미디어 쿼리로 해결!
'TIL' 카테고리의 다른 글
[React Native] cli.init is not a function (0) | 2023.01.28 |
---|---|
[Sharp] VipsJpeg: Invalid SOS parameters for sequential JPEG (0) | 2022.12.10 |
A non-serializable value was detected in an action, in the path: `register`. ~ 에러 해결 (0) | 2022.09.29 |
Next.js 에서 Script가 여러개 추가되는 문제 (0) | 2022.07.13 |
standard_init_linux.go:228: exec user process caused: exec format error (0) | 2022.05.11 |
댓글