Does css hover work on mobile devices? I have a css hover class which works fine on a regular web browser, but doesn’t work on mobile browsers.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
:hoverpseudo-class needs a pointing (graphical input) device, capable of distinguishing the actions pointing and selecting/activating. Usually on mobile devices with a touch interface you don’t have the former, only the latter. Also some pen interfaces only allow activating, not pointing.So, to answer your question: It depends on the device but likely no. And don’t rely on it. With touch-screen devices quickly gaining in popularity you’ll lose the entirety of pointing-only events.