- This topic is empty.
-
AuthorPosts
-
June 15, 2014 at 10:43 am #172799MBMParticipant
I want to add a transition to my drop down menus something like this :
-webkit-transition: left 0.4s ease-in-out, opacity 0.6s ease-in-out;
I have added this in all elements of the menu but it won’t fire.
June 15, 2014 at 11:22 am #172800Paulie_DMemberYou can’t transition
display:none
if that’s what you mean.Try this.
http://www.greywyvern.com/?post=337
http://codepen.io/Paulie-D/pen/ea82be4c865048ea9ac7c65b6abef7de
The Jquery is just there to add classes but its not doing the transition.
June 15, 2014 at 12:10 pm #172802MBMParticipantIf I remove
display:none;
the links collapse. I’ve added more elements and updated the pen.June 15, 2014 at 2:30 pm #172807Paulie_DMemberDid you read the article?…I don’t see the properties it suggests in the updated fiddle.
As you can see from my linked Codepen…it does work.
June 15, 2014 at 2:34 pm #172808Paulie_DMemberHere’s a fork of your pen that’s a little more specific in it’s selectors for you to adapt.
June 15, 2014 at 3:00 pm #172809MBMParticipantThe drop down elements are supposed to be hidden and only display on hover. I’ve changed the pen to show how it displays normally. I’m not sure how to maintain the drop down on hover without
display:none;.
June 16, 2014 at 5:14 am #172832Paulie_DMemberI repeat…did you read the article I linked…it explains how to use visibility and opacity to achieve what you want?
http://www.greywyvern.com/?post=337
I even provided a Codepen in which I demonstrated the concept.
http://codepen.io/Paulie-D/pen/ea82be4c865048ea9ac7c65b6abef7de
I’m not going to write it for you.
June 18, 2014 at 8:52 am #173053MBMParticipantThe structure is different to the one I use. I can get the transitions to display but when hovering between links, the links are shown in horizontal blocks before re-aligning vertically. I’ve updated the pen.
June 18, 2014 at 9:22 am #173056Paulie_DMemberThis is the problem
-webkit-transition: all 0.8s ease-in-out; -moz-transition: all 0.8s ease-in-out; transition: all 0.8s ease-in-out;
On’y transition the properties you need and apply delays to stagger them as required.
THAT was the point of the article….try re-reading it.
The structure is irrelevant it’s the transition CSS you should be paying attention to.
June 18, 2014 at 9:47 am #173059MBMParticipantThanks. I’ll play around with the transitions.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.