任何人都知道为什么课堂上的风格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>