!important关键字:会为所有混合带来的样式,添加!important
在css里面加上!important,是所有样式优先级最高的

 

在less里面什么场景会用important,在调试的时候
.border_03{
  border:1px solid pink;
}
.test_important{
  .border_03() !important;
}
=>
.test_important {
  border: 1px solid pink !important;
}
一般的时候我们不要用important




相关文章:

  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2021-10-07
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-01
  • 2022-12-23
  • 2021-05-24
  • 2021-06-21
相关资源
相似解决方案