【问题标题】:syntax error in visual studio code "expected [css-rcurlyexpected]"Visual Studio 代码中的语法错误“预期 [css-rcurlyexpected]”
【发布时间】:2019-06-28 12:48:13
【问题描述】:

我在注释行的可视代码中收到 [scss] } 预期 [css-rcurlyexpected] 错误。有人知道为什么吗?

@keyframes wordSlider {
  $steps: -0%, -25%, -50%, -75%;
  @for $index from 0 to length($steps)-1 {
    $next: $index + 1;
    $step: floor(100/ (length($steps)-1));
    $animation_step: floor($step * 0.2);
    //#{$step*$index}%,
    //#{($step*$next) - $animation_step}% {
    //   transform: translateY(nth($steps, $index + 1));
    //}
    100% {
      transform: translateY(nth($steps, length($steps)));
    }
  }
}

【问题讨论】:

    标签: css sass css-transitions css-animations


    【解决方案1】:
    @keyframes wordSlider { 
        $steps: -0%, -25%, -50%, -75%; 
        @for $index from 0 to length($steps)-1 { 
            $next: $index + 1; 
            $step: floor(100/ (length($steps)-1)); 
            $animation_step: floor($step * 0.2); 
            //#{$step*$index}%, 
            //#{($step*$next) - $animation_step}% { 
            // transform: translateY(nth($steps, $index + 1));}// 
    
    // Try closing your comment with ( //) //
    

    【讨论】:

    • 你能用一些演示来支持自己吗?
    猜你喜欢
    • 2022-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-20
    • 1970-01-01
    • 2019-09-28
    • 2013-07-16
    • 1970-01-01
    相关资源
    最近更新 更多