Less注释

来源:互联网 发布:电影人工智能结局 编辑:程序博客网 时间:2024/06/05 00:11

Less注释

适当的注释是保证代码可读性的必要手段,Less支持两种类型的注释:多行注释和单行注释。

1)形如 /* */ 的多行注释。如:

  1. /* Hello, I'm a CSS-style comment */
  2. .class { color: black }

2)  双斜线的单行注释。如:

  1. // Hi, I'm a silent comment, I won't show up in your CSS
  2. .class { color: white }

但需要注意的是:单行注释是不会出现在编译后的 CSS 文件中,如果是针对样式说明的注释,建议使用多行注释。



原创粉丝点击