Home › Forums › CSS › Need help with mobile navigation effect › Reply To: Need help with mobile navigation effect
January 7, 2018 at 11:08 pm
#265123
Beverleyh
Participant
The approach I’d take (which is probably what you’ll find a lot of when you research similar menus/tutorials online) is;
– toggle the addition or removal of a class with JS
– define a slide transition via the class with CSS
You can’t transition between display:none;
and other values in CSS, but I’m not sure how jQuery handles things with its horizontal reveal methods. From memory, it’s vertical slideDown
method does it by calculating lots of incremental inline styles to change the height
on the fly, so I image that the horizontal slide animations do something similar with width
.