Home > Article > Web Front-end > How to make single line comments in css
In CSS, you can use the "/*" and "*/" symbols to make single-line comments, and the syntax format is "/* Content to be commented */". Comments in CSS are usually used to explain the purpose of style rule declarations and help others understand how to handle style rules when editing style sheets. Browsers do not parse the content in comments.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Conventionally use // to comment single lines in CSS files. As a result, in IE, this line of definition is still considered valid, but in chrome, firefox, and safari, it is considered that this line has been commented out.
The correct comment is to use /* XXXXX */
/*设置Select样式*/ .SelectList { height: 32px; line-height: 32px; overflow:hidden; }
Like the above code, the code included by /* */ will not be displayed on the web page.
Recommended learning: css video tutorial
The above is the detailed content of How to make single line comments in css. For more information, please follow other related articles on the PHP Chinese website!