【发布时间】:2014-08-26 13:50:03
【问题描述】:
【问题讨论】:
标签: css colors animate.css
【问题讨论】:
标签: css colors animate.css
h1 {
color: #f35626;
background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: hue 60s infinite linear;
}
@-webkit-keyframes hue {
from {
-webkit-filter: hue-rotate(0deg);
}
to {
-webkit-filter: hue-rotate(360deg);
}
}
对于这样的标记
<h1>CHANGE COLOR TEXT</h1>
您可以在此处查看示例:http://jsfiddle.net/3oqep26z/
修改动画时间以加快颜色变化
【讨论】:
我的猜测是它会使用 CSS3 我在网上找到了这个
【讨论】:
这是 css3 功能。不适用于任何地方
以某种风格设置动画:
-webkit-animation-duration: 10s;
给它命名
-webkit-animation-name: colours;
并以您需要的方式使用
@-webkit-keyframes colours {
0% {background-color: #39f;}
15% {background-color: #8bc5d1;}
30% {background-color: #f8cb4a;}
45% {background-color: #95b850;}
60% {background-color: #944893;}
75% {background-color: #c71f00;}
90% {background-color: #bdb280;}
100% {background-color: #39f;}
}
【讨论】: