CSS 中是否有可用的多行注释?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7170868/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 01:23:28  来源:igfitidea点击:

Is there any multi line comments available in CSS?

css

提问by Hearaman

Is there any multi line comments available in CSS?

CSS 中是否有可用的多行注释?

I used /* and */comments in NetBeans, but when i applied them to my CSS code the web page is not working with those CSS properties.

/* and */在 NetBeans 中使用了注释,但是当我将它们应用于我的 CSS 代码时,网页无法使用这些 CSS 属性。

回答by mauris

CSS comments are multiline:

CSS 注释是多行的:

/* this is a comment */

multiline:

多行:

/* 
  this is a comment
  and it is awesome because
  it is multiline!
*/

回答by Naveed

It is my first search result for multiline comments in css:

这是我在 css 中搜索多行注释的第一个结果:

CSS Comments

CSS 注释

/* Comment here */
p 
{
margin: 1em; /* Comment here */
padding: 2em; 
/* color: white; */
background-color: blue;
}

/*
multi-line
comment here
*/