I have the following:
-webkit-transition-property: top, bottom, z-index;
-webkit-transition-duration: 0.5s;
Problem is I don't want the z-index to transition until after top & bottom are done.
Is there a way to tell Webkit transition to transition top/bottom and then when done, do z-index instantly or with the duration, either way?
Thanks
To make the transition occur, you must specify at least two things — the name of the CSS property to which you want to apply the transition effect using the transition-property CSS property, and the duration of the transition effect (greater than 0) using the transition-duration CSS property.
The transition CSS property is a shorthand property for transition-property , transition-duration , transition-timing-function , and transition-delay .
You have to specify a delay on the z-index transition:
-webkit-transition-property: top, bottom, z-index;
-webkit-transition-duration: 0.5s;
-webkit-transition-delay: 0s, 0s, .5s;
And for your info, in javascript, you can also listen on the webkitTransitionEnd
event and modify the z-index when this event is fired.
This event have two useful properties :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With