Hi guys.
I've been trying to figure out how to animate two images stack on each other using keyframes in CSS3 without using the hover function in CSS.
This is my CSS code so far.
The code actually works if I use a hover function on it.Code:#aimage img { position:absolute; left:0; margin-bottom: 20px; opacity: 1; } #aimage img.bottom { opacity: 1; animation: kframes 2s; -moz-animation: kframes 2s; /* Firefox */ -webkit-animation: kframes 2s; /* Safari and Chrome */ -o-animation: kframes 2s; /* Opera */ } @keyframes kframes { 0% {opacity: 0;} 100%{opacity:1;} } @-moz-keyframes kframes /* Firefox */ { 0% {opacity: 0;} 100%{ opacity:1;} } @-webkit-keyframes kframes /* Safari and Chrome */ { 0% {opacity: 0;} 100%{opacity:1;} } @-o-keyframes kframes /* Opera */ { 0% {opacity: 0;} 100%{opacity:1;} }
Is it even possible without using a hover function, javascript or a jquery on it? If not, then I have to settle it down and use jquery to my animation.


Reply With Quote


