如何在样式表块中添加注释
您可能需要在样式表块中添加其他注释。因此,注释样式表的任何部分都非常容易。您可以简单地将注释放在/*.....这是样式表中的注释.....*/。
您可以使用/*....*/来注释多行块,就像在C和C++编程语言中那样。
让我们看看如何添加评论:
<!DOCTYPE html>
<html>
<head>
<style>
p {
color: red;
/* This is a single-line comment */
text-align: center;
}
/* This is a multi-line comment */
</style>
</head>
<body>
<p>Hello World!</p>
</body>
</html>