Css 如何使多个文本阴影按顺序显示?

Css 如何使多个文本阴影按顺序显示?,css,Css,我试过使用transition:all.4s步骤(4,end)但当然,所有阴影都分四步显示,尽管我希望在过渡的.4s中显示一个阴影,然后是下一个,然后是下一个,依此类推 CSS: transition的第一个参数是要应用转换的属性。在您的例子中,您已经指定了all,也许您应该指定text shadow 然后在text shadow中只指定最终状态,因为您已经要求它执行4个步骤 我已经检查了代码,它似乎工作正常: a { color: white; text-decoration: none; }

我试过使用
transition:all.4s步骤(4,end)但当然,所有阴影都分四步显示,尽管我希望在过渡的
.4s
中显示一个阴影,然后是下一个,然后是下一个,依此类推

CSS:


transition
的第一个参数是要应用转换的属性。在您的例子中,您已经指定了
all
,也许您应该指定
text shadow

然后在
text shadow
中只指定最终状态,因为您已经要求它执行4个步骤

我已经检查了代码,它似乎工作正常:

a {
color: white;
text-decoration: none;
}
a:hover, a:active {
    text-decoration: line-through;
    transition: text-shadow .4s steps(4, end);
    text-shadow: 6px 2px rgba(255, 255, 255, .6);
}

transition
的第一个参数是要应用转换的属性。在您的例子中,您已经指定了
all
,也许您应该指定
text shadow

然后在
text shadow
中只指定最终状态,因为您已经要求它执行4个步骤

我已经检查了代码,它似乎工作正常:

a {
color: white;
text-decoration: none;
}
a:hover, a:active {
    text-decoration: line-through;
    transition: text-shadow .4s steps(4, end);
    text-shadow: 6px 2px rgba(255, 255, 255, .6);
}