5、8(非BOM),在HTML中指定UTF-8编码,在CSS中则不需要特别指定因为默认就是UTF-8。 ·单个CSS文件避免过大(建议少于300行) 二、注释规范1、文件顶部注释(推荐使用)/* * @description: 中文说明 * @author: name * @update: name (2013-04-13 18:32) */ 2、模块注释/* module: module1 by 张三 */ … /* module: module2 by 张三 */ 模块注释必须单独写在一行3、 单行注释与多行注释/* this is a short c
6、omment */单行注释可以写在单独一行,也可以写在行尾,注释中的每一行长度不超过40个汉字,或者80个英文字符。/** this is comment line 1.* this is comment line 2.*/多行注释必须写在单独行内4、特殊注释/* TODO: xxxx by name 2013-04-13 18:32 *//* BUGFIX: xxxx by name 2012-04-13 18:32 */用于标注修改、待办等信息5、区块注释/* Header */ /* Footer */ /* Gallery */ 对一个代码区块