我试图弄清楚为什么这个简单的代码无效。
@keyframes testing {
from: {font-size: 42px;}
to: {font-size: 64px;}
}
a:after {
content: "Hello!";
animation: testing 1s infinite;
}
-
<a></a>
任何人都可以解释一下吗?
答案 0 :(得分:4)
从关键帧中删除:
,如下所示
@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;
}
&#13;
<a></a>
&#13;