标题太模糊?这是一个例子:
html:
<h1>Heading 1</h1>
<h1 class='header'>Heading 2</h1>
CSS:
h1 {
font-size: 2px;
}
.header {
font: 12px;
}
在网站上,标题 1 和标题 2 的字体大小均为 2px。为什么是这样?有没有我不知道的等级制度?如果是这样,我在哪里可以阅读更多关于它的信息?因为我一直在寻找但没有任何线索。
--- 编辑--- 好的拳头例子只是一个非常愚蠢的错字....感谢减号-1。并感谢您的回答 dystroy,尽管在我的示例中发生这种情况纯属巧合。
因此,我现在将给出一个真实的例子,希望它不再是微不足道的事情。
html:
<div class="container-fluid">
<div id="content" class="product-info">
<div class="product_overview_wrapper span-fluid250-overview product-info">
<h3 style="heading_price" id="heading_price_id">PRICE:</h3>
</div>
</div>
</div>
CSS:
.product_overview_wrapper h3 , .product_overview_wrapper p {
font-family: 'Ovo', serif;
font-size: 1.1em;
font-weight: lighter;
color: #363636;
margin-top: 19px;
line-height: normal;
}
.heading_price {
margin-top: 100px;
}
如上所示,我之前设置了一次 h3 样式。但是我的 .heading_price 样式根本没有效果。当我检查元素时,我什至没有在 chrome 中看到它......希望有人能提供帮助,这不会再次让我失去积分;)