p {
animation-duration: 3s;
animation-name: slidein;
}
@keyframes slidein {
from {
margin-left: 100%;
width: 300%;
}
to {
margin-left: 0%;
width: 100%;
}
}
For the animation CSS code above, I'm wondering whether there's any way to pass the values of margin-left
and width
as parameter from Javascript.