似乎我被困住了。 爲什麼下面的代碼顯示12px的消息,但不是50px?是不是class1有 如何修復它,如果我不允許更改*屬性?即使!重要也無濟於事。html css * {...}:無法更改字體大小
<html>
<head>
<style type="text/css">
*
{
font-size : 12px
}
.class1
{
font-size : 50px;
}
</style>
</head>
<body>
<div class="class1">
<span>why it is not 50px font size?</span>
</div>
</body>
</html>
不知道爲什麼你不能更改星形選擇器;這是糟糕的代碼,並且很明顯會導致問題。你不能改變它的原因是什麼? – Spudley 2012-08-15 19:36:56
我正在開發項目的擴展(fork)。我最好不要觸摸另一個人寫的css文件。 – Haradzieniec 2012-08-16 12:13:58