为什么/ ** /注释在样式表中工作,但是//注释没有? [英] Why do /**/ comments work in stylesheets but // comments don't?
本文介绍了为什么/ ** /注释在样式表中工作,但是//注释没有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有这样的好理由吗?
推荐答案
CSS中注释的语法是: / *在这里注释* /
The syntax for comments in CSS is: /* comment here */
The //
is not a valid syntax. I guess this allows CSS to work correctly when stripped from whitespace and new line characters during minification.
这篇关于为什么/ ** /注释在样式表中工作,但是//注释没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文