Reputation: 757
I have a footer with the following CSS:-
#transFooter {
opacity: 0;
margin-left: -2000px;
}
@-webkit-keyframes transFooter {
100% { margin-left: 0; opacity: 1; }
}
@keyframes transFooter {
100% { margin-left: 0; opacity: 1; }
}
It animates in with the following code:-
document.getElementById("transFooter").style.animation = "transFooter 2s forwards";
However, it doesn't seem to work on Chrome. Any ideas why?
Upvotes: 1
Views: 1251
Reputation: 5490
use this
document.getElementById("transFooter").style.webkitAnimation= "transFooter 2s forwards";
Upvotes: 0
Reputation: 1086
In JavaScript, add:
document.getElementById("transFooter").style["-webkit-animation"] = "transFooter 2s forwards";
Upvotes: 1