I'm creating CSS animations on the fly, so I need to insert a CSS timing function into my document. As in:
@-webkit-keyframes slide
{
from {
-webkit-transform: translateX(-100px) translateY(-100px);
-webkit-animation-timing-function: ease-in;
}
33% {
-webkit-transform: translateX(-100px) translateY(-50px);
-webkit-animation-timing-function: linear;
}
66% {
-webkit-transform: translateX(-50px) translateY(0px);
-webkit-animation-timing-function: linear;
}
to {
-webkit-transform: translateX(0px) translateY(0px);
-webkit-animation-timing-function: ease-out;
}
}
Any idea how to pull this off (the insertion) using Javascript? I can add regular classes without any trouble, but this seems to be a special case.