Visual Studio代码“ expected [css-rcurlyexpected]”中的语法错误

时间:2019-02-04 18:06:24

标签: css css3 sass css-transitions css-animations

我在注释行的可视代码中收到 [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)));
    }
  }
}

1 个答案:

答案 0 :(得分:0)

@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 ( //) //