I'm using some CSS3 2D transforms to animate a menu for an Android specific web app.
I'm inserting the animation parameters using Javascript as they only apply after an ontouchstart function is triggered.
Heres the javascript for the first part of the animation as an example:
function d1(){
var d1=document.getElementById('d1');
d1.style["-webkit-animation"] = "slide1";
d1.style["-webkit-animation-duration"] = "3s";
d1.style["-webkit-animation-iteration-count"] = "1";
d1.style["-webkit-animation-fill-mode"] = "forwards";
}
Heres the CSS3 for the slide1
animation:
@-webkit-keyframes slide1 {
0%{-webkit-transform:translateY(0) scaleY(0);}
100%{-webkit-transform:translateY(122px) scaleY(1);}
}
This code displays the animation correctly however once each state of the animation is completed it then disappears. From what i have read, this should be resolved by using -webkit-animation-fill-mode:forwards
or -webkit-animation-iteration-count:1
but neither of these seem to stop/pause the animation after its played.
Has anyone else encountered a similar issue with Android? Please help. Thanks