Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

960design

macrumors 68040
Apr 17, 2012
3,710
1,577
Destin, FL
On several websites, I read that :hover is not working on iphones, iPads,...

But, when I open the example http://www.w3schools.com/cssref/tryit.asp?filename=trycss_sel_hover_dropdown on my iPhone, the hovering is working. Why, is it working on this site. Is it reliable?
Mobile Safari is guessing your intentions. You cannot 'hover' with an iPhone

A hover is fired when the mouse pointer literally hovers over the element. Clicking fires the :active psuedo class.

See in action here:
http://output.jsbin.com/dojapemage

Note: no hover over the paragraph, even if you tap with your iPhone. But the button will momentarily display blue for the active click and then transition to the hover effect. Try on a computer with a mouse and you will see the hover red over the paragraph and the blue active when clicking the button.

Hope this clears it up a little.
 
  • Like
Reactions: gimikinc
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.