【发布时间】:2019-04-19 22:52:00
【问题描述】:
我希望标题中文本中的那些红色/橙色颜色在无限循环中交替出现,就像一个范围,在一个循环中,不会放慢速度。 现在它只是将文本隐藏在一个循环中。
我尝试使用线性渐变来切换,但无法弄清楚 在正确的轨道上:http://recordit.co/HFknq7M2TB 我想要那些颜色,但无限且不减慢。只是从左到右的连续范围。
.landtitlep {
margin-bottom: 5%;
background: linear-gradient(to right, #ff6600 10%, #800000 70%, #cc0000 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 10vw;
font-family: "Poppins", sans-serif;
text-align: center;
background-clip: text;
animation-name: shimmer;
animation-duration: 7s;
animation-iteration-count: infinite;
animation: shimmer 7s infinite;
/*background-repeat: no-repeat;*/
text-align: center;
background-size: 70% 100%;
background-clip: text;
animation-name: shimmer;
animation-duration: 2s;
animation-iteration-count: infinite;
background-repeat: no-repeat;
background-position: 0 0;
background-color: linear-gradient(to right, #ff6600 10%, #800000 70%, #cc0000 100%);
}
@keyframes shimmer {
0% {
background-position: top left;
}
100% {
background-position: top right;
}
}
【问题讨论】:
-
您好,欢迎来到 SO。还请添加 HTML 并制作一个 coden-p
<>来复制您的问题 -
这就是您要找的东西:codepen.io/anon/pen/LvmyBY ?
-
我找到了一个与您的问题相匹配的 SO 帖子。接受的答案似乎是您正在寻找的:stackoverflow.com/questions/26176095/…
标签: css