Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.