S
S
Sergey questions2018-03-16 12:13:56
css
Sergey questions, 2018-03-16 12:13:56

How to get rid of :hover on touchscreens?

Hello.
I know, this topic has long been hackneyed, but still, maybe someone has some personal working methods ..

How to get rid of :hover on touchscreens? I think you understand that, for example, a link that has :hover in CSS on touchpads will need to be clicked 2 times to follow it. the first "finger click" activates :hover, and the second one activates the function itself.

Now I use this method:
I collect all elements with :hover from the main style and enclose them in a condition

@media screen and (min-width: 840px){
    тут все элементы с hover
}


But with this method, it is not particularly convenient to make changes to an already finished project. How can I replace?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Kublyakov, 2018-03-16
@smartycms

https://developer.mozilla.org/en-US/docs/Web/CSS/@...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question