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
Is there any multi line comments available in 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:
/* Comment here */
p
{
margin: 1em; /* Comment here */
padding: 2em;
/* color: white; */
background-color: blue;
}
/*
multi-line
comment here
*/