请帮我明白的地方,我这个代码会错,因为我的形象的动画工作正常,但文字动画没有在所有工作:我的CSS动画代码是不工作
的jsfiddle:https://jsfiddle.net/bwp1n56v/5/
HTML:
@-webkit-keyframes hue {
from {
-webkit-filter: hue-rotate(0deg);
}
to {
-webkit-filter: hue-rotate(-360deg);
}
}
@keyframes round {
100% {
border-radius: 0px;
width: 256px;
height: 256px;
opacity: 100%;
}
0% {
border-radius: 25px;
width: 0px;
height: 0px;
opacity: 0%;
}
}
img {
animation: round 3s ease-in-out;
}
#anim {
-webkit-animation: hue 60s infinite linear;
}
<h1>As you see this animation works fine:</h1>
<img src="https://i.stack.imgur.com/LwSTv.png?s=328&g=1 alt=" AV ">
<hr>
<h1 class="anim ">But this text must be animated with hue animation!</h1>
非常感谢!在你回答之前的所有时间,我在想#是班级和。是id。 :D但实际上#是id和。是班级。 – sudo
等等...我用** id =“anim”**替换了** class =“anim”**但它仍然不起作用:(https://jsfiddle.net/bwp1n56v/6/ – sudo
它实际上正在工作。但你的h1的黑色不受色调的影响... – yeouuu