Comments begin with the characters /* and end with the characters */. They may occur anywhere outside other tokens, and their contents have no influence on the rendering. Comments may not be nested.
/*
開(kāi)始,以字符 */
結(jié)束/*Comment Text*/
注釋內(nèi)容第一個(gè)字符和最后一個(gè)字符都是一個(gè)空格字符,單獨(dú)占一行,行與行之間相隔一行
推薦:
/* Comment Text */
.jdc{}
?
/* Comment Text */
.jdc{}
不推薦:
/*Comment Text*/
.jdc{
display: block;
}
.jdc{
display: block;/*Comment Text*/
}
注釋內(nèi)容第一個(gè)字符和最后一個(gè)字符都是一個(gè)空格字符,/*
與 模塊信息描述占一行,多個(gè)橫線分隔符-
與*/
占一行,行與行之間相隔兩行
推薦:
/* Module A
---------------------------------------------------------------- */
.mod_a {}
?
?
/* Module B
---------------------------------------------------------------- */
.mod_b {}
不推薦:
/* Module A ---------------------------------------------------- */
.mod_a {}
/* Module B ---------------------------------------------------- */
.mod_b {}
在樣式文件編碼聲明 @charset
語(yǔ)句下面注明頁(yè)面名稱(chēng)、作者、創(chuàng)建日期等信息
@charset "UTF-8";
/**
* @desc File Info
* @author Author Name
* @date 2015-10-10
*/
更多關(guān)于 CSS 注釋?zhuān)?a rel="external nofollow" target="_blank" target="_blank">#Comments
更多建議: