Scss--注释--方法/实例

原文网址:Scss--注释--方法/实例_IT利刃出鞘的博客-CSDN博客

简介

        本文用实例介绍Scss的注释的用法。

注释的写法

        Sass 支持标准的 CSS 注释。如下:

  • 多行注释 /* */
    • 会被完整输出到编译后的 CSS 文件中
  • 单行注释 //
    • 不会被输出到编译后的 CSS 文件中

示例

Scss:

/* This comment is
 * several lines long.
 * since it uses the CSS comment syntax,
 * it will appear in the CSS output. */
body { color: black; }

// These comments are only one line long each.
// They won't appear in the CSS output,
// since they use the single-line comment syntax.
a { color: green; }

编译后的CSS:

/* This comment is
 * several lines long.
 * since it uses the CSS comment syntax,
 * it will appear in the CSS output. */
body {
  color: black;
}

a {
  color: green;
}

猜你喜欢

转载自blog.csdn.net/feiying0canglang/article/details/125572768
今日推荐