I have this short piece of code which fades out my navigation bar. Everything is working fine.
The visible part:
.navigation-visible {
position: fixed;
top: 0;
left: 0;
background: blue;
-webkit-opacity: 1;
-moz-opacity: 1;
opacity: 1;
}
The part when it's hidden:
.navigation-not-visible {
position: fixed;
top: 0;
left: 0;
background: blue;
-webkit-opacity: 0;
-moz-opacity: 0;
opacity: 0;
-webkit-transition: all 800ms ease;
-moz-transition: all 800ms ease;
-ms-transition: all 800ms ease;
-o-transition: all 800ms ease;
transition: all 800ms ease;
}
What I'd like to do now, is to add a another animation which directly moves my navigation bar -100px to the top after it has been faded out.
So I tried this code, but of course I failed miserably.
-webkit-transition: all 800ms ease, position translateY(-100%);
The big question: What am I doing wrong here?
positionisn't how you move an element.translateY()goes withtransform, and what you're looking to change is thetoprule.position translateY(-100%)thing is working fine when I use it single, but I need it in combination withease. First fade it out and then move it 100px to the top.