DEV Community

Discussion on: 10 Dropdown Menu Animations with CSS Transforms

Collapse
 
ghost profile image
Ghost

How do you deal with touchscreens? no hover there. I was banging my head on how to do this without JS, and just found that :target can be used instead of :hover for that (it is maybe obvious for others, but I'm more of a backend kinda fellow), you have to click on the button tho, but I kinda prefer it that way, also you have to add a close button since you can't keep the menu open with the hover (obviously), the close button just has to be an empty link that changes the target. I'll try to mix my current clicky dropdown with this awesome animations, thanks.

I don't know, maybe everyone knows about it, but maybe not, I hope is useful to someone (it would have save me some head banging) :)