請幫我明白的地方,我這個代碼會錯,因爲我的形象的動畫工作正常,但文字動畫沒有在所有工作:我的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