I am trying to transition content with a @keyframes
animation when loading and unloading content with Ajax. A active demo is currently here: Test Page
I thought maybe I could use no JavaScript but I am not sure if this will work? Could I be wrong in my CSS attempt below instead?
/* Animation Settings */
.aniDown {
z-index:0;
-webkit-animation-name: slideDown;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: ease;
-webkit-animation-direction:normal;
}
@-webkit-keyframes slideDown {
0% { margin-top:-3000px; }
40% { margin-top:-100px; }
100% { margin-top:0px; }
}
header a:active .aniDown,
header a:focus .aniDown {
-webkit-animation-name: slideUp;
}
@-webkit-keyframes slideUp {
0% {margin-top:0px;}
20% {margin-top:-1000px;}
100% {margin-top:-3000px;}
}