Select Page
How to disable CSS hovers in mobiles and touch devices

You must have faced this issue such that the background changes on hovers on mobiles and touch devices remain hover-styled even after you have touched the screen and not touching it anymore. The simple solution to this is enclosing all hovers in the following media query.

@media (hover: hover) {
    //All style inside this will be only functional in devices which support hovers.
}

Please leave the comment below if this does not solve your problem, I will be happy to find out the solution for you 🙂