Why do /**/ comments work in stylesheets but // comments don't?
问题 Is there a good reason for this? Lame question, but I just wondered if there was a reason why. 回答1: 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. 回答2: Because the specification allows for /**/ but not // :) Seriously, though, CSS treats newlines like all other whitespace, and would not be able to determine the end of the comment without a