How to comment in css

王林
Release: 2023-01-06 11:13:01
Original
12600 people have browsed it

The way to comment in CSS is to use the symbols [/**/], for example [/*define the header style of the web page*/]. In CSS, all text information placed between the [/*] and [*/] delimiters are called comments.

How to comment in css

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

Adding comments in CSS is very simple. All text information placed between the /* and */ delimiters are called comments.

CSS has only one kind of comment. Whether it is a multi-line comment or a single-line comment, it must start with /* and end with */, and add the comment content in the middle.

[Example 1] Comments are placed outside the style sheet.

/*定义网页的头部样式*/ .head{ width: 960px; } /*定义网页的底部样式*/ .footer {width:960px; }
Copy after login

[Example 2] Comments are placed inside the style sheet.

p{ color: #ff7000; /*字体颜色设置*/ height:30px; /*段落高度设置*/ }
Copy after login

Learning video sharing:css video tutorial

The above is the detailed content of How to comment 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
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!