我想向我的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 -->
我必須失去了一些東西明顯。 。 。