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

标签 css 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)));
    }
  }
}

最佳答案

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

关于css - Visual Studio 代码中的语法错误 "expected [css-rcurlyexpected]",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54521899/

相关文章:

css - susy-breakpoint 和 susy-media 有什么区别?

ruby-on-rails - 是否可以在 Rails 6 中禁用 Sass?

css - Div 在 Firefox、Safari、Chrome 等中显示,但在 Internet Explorer 中不显示

jquery - Bootstrap 中的下拉菜单不起作用

javascript - 延迟加载图像如何

java - 在 javafx 运行时更改一种颜色 [全局] 颜色

css transitions 阻止窗口滚动

css - 什么 CSS 将更改 Eclipse (Juno) 选项卡悬停背景颜色?

css - stylelint - 哪里有创建自己的插件的示例?

javascript - 使用 CSS 进行页面转换