gpt4 book ai didi

css - 动画 :after in css

转载 作者:行者123 更新时间:2023-11-28 15:59:17 25 4
gpt4 key购买 nike

我想弄清楚为什么这个简单的代码不起作用。

http://jsfiddle.net/yq1ro6n5/

@keyframes testing {
from: {font-size: 42px;}
to: {font-size: 64px;}
}
a:after {
content: "Hello!";
animation: testing 1s infinite;
}

-

<a></a>

谁能解释一下?

最佳答案

像这样从关键帧中移除:

@keyframes testing {
from {
font-size: 42px;
}
to {
font-size: 64px;
}
}

a {
}
@keyframes testing {
from {
font-size: 42px;
}
to {
font-size: 64px;
}
}
a:after {
content:"Hello!";
animation: testing 3s infinite;
}
<a></a>

关于css - 动画 :after in css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32348292/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com