http://jsfiddle.net/cD4Gr/1/Come si usano le animazioni CSS per far scorrere verso l'alto un elemento di posizione fisso dalla parte inferiore della pagina?
Questo è il mio codice di animazione:
@-webkit-keyframes silde_to_top {
0% {
bottom: 0%;
top: default;
}
100% {
bottom: default;
top: 0%;
z-index: 1000000;
opacity: 0.5;
}
}
#test{
-webkit-animation-name: silde_to_top;
-webkit-animation-duration: 5s;
-webkit-animation-timing-function: ease;
-webkit-animation-iteration-count: 1;
-webkit-animation-direction: normal;
-webkit-animation-delay: 0;
-webkit-animation-play-state: running;
-webkit-animation-fill-mode: forwards;
}
Attualmente, il div solo auto-inizia nella parte superiore, invece di scorrere verso l'alto. l'unica cosa che anima è l'opacità.