+ 4
Hi, anyone knows how to change the animation-duration of a keyframe using js .
I tried the code above but still doesn't work. .
19 Antworten
+ 5
https://bugs.chromium.org/p/chromium/issues/detail?id=399950 have found this
+ 5
well, I could not find anything on mobile. just an idea, what about changing the animation class with a new animation duration?
+ 4
Ok try style.webkitAnimationDuration on Chrome and Safari and style.mozAnimationDuration on Firefox
+ 4
can you show me your CSS declaring animation duration please?
+ 4
should be already fixed. i am looking for a code
+ 4
glad to hear that my friend.
+ 3
document.getElementById('box1').style.animationDuration="10s";
+ 3
Do you use jQuery or not?
+ 3
I am using js only
+ 3
can you post your code (full)?
+ 3
can we change the animation-duration while itis running?
+ 3
function a(){
var elem = document.getElementById("box1");
elem.style.animationDuration = "200ms" ;
};
+ 3
it is working to change animation color.
function b(){
var elem = document.getElementById ("box1");
elem.style.backgroundColor= "blue";
};
+ 3
I already tried this way still doesn't work.
+ 3
#box1{
position: absulte;
width: 50px;
height:50px;
background: yellow;
border: 1px solid black;
animation-duration: 5s;
-webkit-animation-name: demo1;
-webkit-animation-duration: 5s;
-webkit-animation-iteration-count: 5;
-
+ 2
tried it didn't work. thanks for trying.
+ 2
of course with html and css
+ 2
so it will not work!!
+ 2
I did not get you.