我正在使用多行注释
/* * 常见样式请看这里 */ 样式定义继续...
我在编译时遇到错误。它说:
Error: Invalid CSS after "*/": expected identifier, was ""
请注意:我没有使用 SCSS,而且我也不希望。别问我为什么。因此,请发布不包含 SCSS 解决方案的答案。
最佳答案
如果您在多行中使用注释 */
以及内容,请尝试将其缩进至少 2 个空格。这是 codepen 上的示例:http://codepen.io/anon/pen/XjJAbQ
/* This should work */
///*
//This won't work!
//*/
///*
//This will not work
// */
/**
* This is a multi line comment
* And this should work.
*/
// This is a sass comment
.someClass
width: 200px
height: 200px
background: #000
<div class="someClass">
</div>
关于sass - SASS 中的多行注释抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39310999/