使用 JS 编辑 CSS 动画持续时间
continue
How could I change the duration of flipHeads
from 3s to 0s using pure Javascript?
CSS:
.animate-Heads{
animation: flipHeads 3s;
animation-fill-mode: forwards;
}
Any help is greatly appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以尝试
You can try
Im not fan on inline css so i would add class to element.
document.querySelector('.animate-Heads').classList.add('remove-duration')
.animate-Heads.remove-duration{ animation-duration: 0s; }
Im not fan on inline css so i would add class to element.
document.querySelector('.animate-Heads').classList.add('remove-duration')
.animate-Heads.remove-duration{ animation-duration: 0s; }