lcw5945
<h1 class="name1 name2">hahah</h1>

  多个css样式值时显示会先解析name1 的值,然后再解析name2 的值,name2 中的属性会覆盖name1中相同的属性,如果不相同的都会显示出来

h1.name1{
	font-family: Georgia, serif;
	text-align: center;
}

h1.name2{
	color: #00ff00;
	font-weight: normal;
}

  显示效果:name1 和 name2 中所有属性都会被使用,如果name2对其改为left 则left会覆盖center

分类:

技术点:

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-11-12
  • 2022-12-23
  • 2021-12-12
猜你喜欢
  • 2021-11-19
  • 2021-11-19
  • 2021-06-19
  • 2021-10-03
  • 2021-11-19
  • 2021-11-19
  • 2021-08-09
相关资源
相似解决方案