当我们在使用类选择器的时候,经常会使用多个关键字来给一个元素添加样式。如下所示:
CSS代码:
<span style="font-size:18px;">p.warning.help {background: red;}</span>
<span style="font-size:18px;"><p class="urgent warning help">Help me!</p></span>
match any p elements that have a class attribute with the word help because it comes last in the selector. If you wrote p.help.warning, then older versions of Explorer would match any p elements that have warning in their class value, whether or not help appears in the same value.