Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Unused CSS Stages Transitions and Transforms 3D Transforms: Part 2

Roscoe Coney
Roscoe Coney
13,124 Points

2-D & 3-D Animations in CSS

I was wondering how do pseudo-classes work such as :hover on other devices such as a tablet or smartphone where a mouse doesn't exist? Would you go about them a different type of way or do they work the same if you were to use touch-screen functionality? Im just curious!

1 Answer

geoffrey
geoffrey
28,736 Points

On my side, I simply don't use hover effect for mobile devices... I add these hover styles for desktop using my media queries. You are right to think about it, because It's very important sometimes, as an exemple if ever you hide a div when hovering an element or something like that... This functionnality won't be available on mobile devices...

For this particular exemple, you could use double tap on mobile devices by using for exemple Jquery mobile.

Hope It helps a bit.