Less注释语法

Less注释语法

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

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

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

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

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

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

posted @ 2017-11-28 10:16  歪脖先生  阅读(3947)  评论(0编辑  收藏  举报