我想向我的HTML样式添加注释,但是我发现当我添加注释时,样式停止工作。添加注释时CSS破坏
下面的工作很好。图标和文字显示为灰色。
<html lang="en">
<head>
<title>test</title>
<link href="/gtd/media/css/font-awesome.css" rel="stylesheet">
</head>
<body>
<style>
.action-star {
color: gray;
}
</style>
<div class="container-fluid">
<span class="action-star"><i class="icon-star icon-large"></i> Test Icon</span>
</div><!--/container-->
</body>
</html>
但是下面的不起作用。图标和文字显示为黑色。
<html lang="en">
<head>
<title>test</title>
<link href="/gtd/media/css/font-awesome.css" rel="stylesheet">
</head>
<body>
<style>
<!-- Comment -->
.action-star {
color: gray;
}
</style>
<div class="container-fluid">
<span class="action-star"><i class="icon-star icon-large"></i> Test Icon</span>
</div><!--/container-->
</body>
</html>
我说唯一的办法就是行:
<!-- Comment -->
我必须失去了一些东西明显。 。 。