
Same as with HTML, comments are useful for two reasons:
和HTML注释一样,我们使用CSS 注释主要有以下两个原因:
- Explaining your code to your future self or other developers.
给自己或者是其他开发者提示
- “Commenting out” blocks of code when you don’t want to delete them but disable them temporarily.
有些代码我们需要暂时让它们不起作用,但是没有必要删除它们,就可以注释掉。
In CSS you write them differently from HTML comments. Here we use /* top open and */ to close.
CSS的注释和HTML注释有些不同。我们使用/* */ 来表示。
/* This is a comment */
a { /* color: red; */
text-decoration: underline;
}




