gpt4 book ai didi

css - 如何在chrome中制作关键帧动画

转载 作者:太空宇宙 更新时间:2023-11-04 04:33:50 26 4
gpt4 key购买 nike

如何在Chrome中制作关键帧动画

fiddle

http://jsfiddle.net/tPw8J/

html

<button class="loading">btn</button>

CSS

@keyframes animation_loading {
from { background-position:0 0; }
to { background-position:25px 0; }
}

@-webkit-keyframes animation_loading {
from { background-position:0 0; }
to { background-position:25px 0; }
}

button.loading {
background-image:url(//www.dynaccount.com/button.bg-loading.png);
animation:animation_loading 0.5s linear infinite;
}

最佳答案

"How to make keyframe animations in Chrome"

您需要包含 -webkit animation 属性的前缀:

button.loading {
background-image:url(//www.dynaccount.com/button.bg-loading.png);
-moz-animation: animation_loading 0.5s linear infinite; /* FF 15 & below */
-webkit-animation: animation_loading 0.5s linear infinite;
animation: animation_loading 0.5s linear infinite;
}

http://jsfiddle.net/tPw8J/3/

关于css - 如何在chrome中制作关键帧动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16738921/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com