扫码关注官方订阅号
这是初始颜色值
具体看demo
但是写上动画效果后颜色值就变了,这个是什么原因,怎么可以让动画颜色和初始值颜色一致
问题出在使用了step(2);
step(2)
animation-timing-function改成step(1);bg方法改成0%和50%;
.min-circle:nth-child(2n - 1) { -webkit-animation: bg 2s steps(1) infinite; animation: bg 2s steps(1) infinite; } @keyframes bg { 0% { background: #ff3c18; } 50% { background: #ffea67; } }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
问题出在使用了
step(2)
;animation-timing-function改成step(1);
bg方法改成0%和50%;