【问题标题】:@keyframes animation on SVG not workingSVG 上的 @keyframes 动画不起作用
【发布时间】:2017-04-30 13:14:23
【问题描述】:

我有一个 SVG,其中包含两个嵌套的 g 元素和类,.logo-path-1 和 .logo-path-2。我已经构建了两个 @keyframes 闪烁动画,以便两个嵌套元素交替闪烁,但目前只有一个在工作。

我尝试压缩 SVG 并多次查看 g 元素。我还尝试使用animation-delay: .25s; 属性来减少@keyframes 的数量,但我无法让第二个g 正确设置动画。

SVG 太大而无法嵌入 sn-p,这是一个 codepen: https://codepen.io/karsonkalt/pen/EmmVQG

【问题讨论】:

    标签: css svg


    【解决方案1】:

    您在第 39 行缺少秒单位(“s”):

    -webkit-animation: blink-2 .25 infinite;
    

    应该是:

    -webkit-animation: blink-2 .25s infinite;
    

    更新CodePen。

    【讨论】:

    • 你是救生员,我要拔掉头发了。
    猜你喜欢
    • 2022-11-11
    • 2021-06-15
    • 1970-01-01
    • 2019-03-04
    • 2013-01-20
    • 2018-03-03
    • 2021-03-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多