【问题标题】:what is the significance of the "+5" after the braces in this css animation keyframe code?这个css动画关键帧代码中大括号后面的“+5”有什么意义?
【发布时间】:2019-10-08 15:30:52
【问题描述】:

我不明白动画规则中的“+5”如何影响动画? 代码是

@keyframes slidy{
    0%{ left: 0%; }

    10%{ left: 0%;}

    15%{+5       
        left: -100%;
        }
    25%{
        left: -100%;
       }
    35%{
        left: -100%;
       }
    40%{+5
        left: -200%;
        }

【问题讨论】:

  • 请分享您的输出。
  • 删除后检查了吗?

标签: css css-animations


【解决方案1】:

不影响动画,会导致解析错误。

specification 中没有此语法的信息或示例。

您还可以通过将代码粘贴到 W3C CSS validator 来验证您的 CSS,并确认语法会产生解析错误。

【讨论】:

    猜你喜欢
    • 2019-05-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-16
    • 2014-10-04
    • 1970-01-01
    • 2011-05-25
    相关资源
    最近更新 更多