CSS的注释部分编程引申的方法
它可以帮助我们记起CSS的含义,加载在HTML文档的位置等.
CSS注释的开始使用/*,结束使用*/
CSS注释语法
CSS Code复制内容到剪贴板
/* 注释内容 */
示例
/* ----------文字样式开始---------- */
/* 梦之都白色12象素文字 */
.dreamduwhite12px
{
color:white;
font-size:12px;
}
/* 梦之都黑色16象素文字 */
.dreamdublack16px
{
color:black;
font-size:16px;
}
/* ----------文字样式结束---------- */
风格建议
我使用行宽不超过 80 字节的文档块风格注释:
CSS Code复制内容到剪贴板
/**
* This is a docBlock style comment
*
* This is a longer description of the comment, describing the code in more
* detail. We limit these lines to a maximum of 80 characters in length.
*
* We can have markup in the comments, and are encouraged to do so:
*
更多知识:郑州软件工程师培训学校