假如div里面有多个!important权重的样式类名.a和.b,哪个优先级最高?
<div class="a b"></div>
.a { display: block !important; } .b { display: none !important; }
答案:b。
谁的!important写在最后,谁就生效。
假如div里面有多个!important权重的样式类名.a和.b,哪个优先级最高?
<div class="a b"></div>
.a { display: block !important; } .b { display: none !important; }
答案:b。
谁的!important写在最后,谁就生效。