任何人都有任何想法爲什麼title_services
類的款式全部適用並且在title_services2
類中僅適用line-height, font-weight; letter-spacing
?當我在Chrome中使用Tool for Developers並選擇h4.title_services
時,它列出了所有樣式,但是當我選擇h4.title_services2
時,它僅顯示這三種樣式。下面是CSS(h4
和h4.title_services
正常工作,h4.title_services2
沒有)不是所有款式都適用
h4 {
font-size:28px;
line-height:2em;
color:#fff;
font-weight:normal;
letter-spacing:-1px;
}
h4.title_services {
font-size:28px;
margin-top:15px;
margin-bottom:15px;
text-align:center;
line-height:1em;
color:#fff;
font-weight:normal;
letter-spacing:-1px;
}
h4.title_services2 {
font-size:28px;
margin-top:25px;
margin-bottom:15px;
text-align:center;
line-height:1em;
color:blue;/*#fff;*/
font-weight:normal;
letter-spacing:-1px;
}
HTML如下:
<article class="grid_3">
<div class="indent-left">
<img style="display: block; margin: 0 auto;" src="../images/services_kid.png" />
<h4 class="title_services">First headline</h4>
<div id="button2"><a class="button2" href="#">BUTTON</a></div>
</div>
</article>
<article class="grid_3">
<div class="indent-left">
<img style="display: block; margin: 0 auto;" src="../images/services_kid2.png" />
<h4 class="title_services2">Second headline</h4>
<div id="button2"><a class="button2" href="#">CENÍK</a></div>
</div>
</article>
你有什麼不工作截圖或的jsfiddle。這並不完全清楚...... – LinkinTED
你有'button2'作爲ID和類。首要問題。但我懷疑這會解決你的問題。您的主題問題未顯示在我的計算機上。你嘗試過各種瀏覽器嗎? – Andy