【发布时间】:2020-11-03 05:33:37
【问题描述】:
所以我试图让文本闪烁,但我希望关键帧之间有一个平滑的过渡。我该怎么做?
fire{
background: -webkit-linear-gradient(yellow, orange,red);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation-name: fire;
animation-duration: 3s;
animation-iteration-count: infinite;
}
@keyframes fire {
0% {
background: -webkit-linear-gradient(yellow, orange, red);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
20% {
background: -webkit-linear-gradient(red, yellow, orange);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
40% {
background: -webkit-linear-gradient(red, orange, orange);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
60% {
background: -webkit-linear-gradient(orange, yellow, red);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
80% {
background: -webkit-linear-gradient(yellow, orange, red);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
80% {
background: -webkit-linear-gradient(red, orange, red);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
<fire>Flicker Flicker</fire>
你建议我做什么来使过渡平滑?
【问题讨论】:
标签: html css css-animations keyframe