是否可以注释掉 css 中包含注释的代码块?

Is it possible to comment out blocks of code that contain comments in css?

如果我有一些css

/* Labeled Section 1 */
.thing1 {}
.thing2 {}

/* Labeled Section 2 */
.thingA {}
.thingB {}

是否可以同时注释掉这两个部分?是否有任何形式的超级或子评论可用于使包含评论的 css 的评论块更容易?

编辑:对于那些以前从未这样做过的人来说,对整个事情添加评论是行不通的。

/*  START BIG COMMENT
/* Labeled Section 1  BIG COMMENT ACTUALLY ENDS HERE*/
.thing1 {}
.thing2 {}

/* Labeled Section 2 */
.thingA {}
.thingB {}
END BIG COMMENT */ 

在大多数语言中,无法嵌套注释 - 这对 CSS 也有效。

你能做的只有以下几点:

/* Labeled Section 1 */
/*
.thing1 {}
.thing2 {}
*/

/* Labeled Section 2 */
/*
.thingA {}
.thingB {}
*/

或者如果您只想拥有一个评论区:

/*
/* Labeled Section 1 * /
.thing1 {}
.thing2 {}

/* Labeled Section 2 * /
.thingA {}
.thingB {}
*/

所以在所有包含的评论 */ 之间添加一个 space 很重要。

这要求您在删除外部注释时删除这个额外的 space。