How to make single line comments in css

醉折花枝作酒筹
Release: 2023-01-05 16:10:57
Original
3386 people have browsed it

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;
        }
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!