Usually, if the CSS comment code is a single-line comment, it starts with /* and ends with */. Here we describe three methods of commenting in CSS code. I believe this article will definitely help you gain something.
Three ways to comment in CSS code
1. Selector (childselector)
If you want to hide a CSS definition in IE, you can use a child selector .
CSS comment code:
html>bodyp { /*declarations*/ }
2. "Wildcard" (*)
This writing method can only be understood by IE browser (hidden from other browsers)
CSS comment code:
*htmlp{ /*declarations*/ }
3. "Backslash" (\)
If you want IE/Win to be valid but IE/Mac to be hidden, you can use "backslash" "Skill.
CSS comment code:
/*\*/ *htmlp{ declarations } /**/
The above is the detailed content of Introduction to three methods of comments in CSS. For more information, please follow other related articles on the PHP Chinese website!