CSS同时选择器

  同一个div拥有多个class时,我们可以作多个class作为组合来选择对象。方法就是将多个.className直接连接在一起(中间不能有空格)。

  

<p class="important urgent warning">
This paragraph is a very important and urgent warning.
</p>
.important.urgent {background:silver;}

 

参考:http://www.w3school.com.cn/css/css_selector_class.asp

相关文章:

  • 2021-12-15
  • 2021-07-22
  • 2021-11-30
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-28
猜你喜欢
  • 2022-02-08
  • 2021-05-11
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2021-11-17
相关资源
相似解决方案