Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css - :hover on touchscreen / phonegap ... make it stop?

Tags:

css

hover

cordova

I'm playing around with apps on Phonegap, and ran into something that's bugging me.

When I put :hover on a class and change the background, it looks like a real button being pressed on a touchscreen, which is good, yeah.

But if I push the button, then slide my finger off the button (without actually clicking it), it still thinks I'm hovered over it so the background stays changed.

Is there another thing I can use besides :hover that won't stay? Only triggered when it's actually clicked?

Hopefully you get what I'm trying to explain.

like image 317
user802609 Avatar asked Nov 03 '22 19:11

user802609


1 Answers

You could try using the :active psuedoclass:

https://developer.mozilla.org/en-US/docs/Web/CSS/:active

like image 134
Alex W Avatar answered Nov 11 '22 02:11

Alex W