Can't override css of element

后端 未结 5 591
时光取名叫无心
时光取名叫无心 2021-01-05 06:51

I have a website with a global template that contains partial templates, but now I\'m stuck with a simple CSS problem:

HTML

5条回答
  •  囚心锁ツ
    2021-01-05 07:12

    It's not about "better match" the rule has higher specificity value please check this link

    I would recommend to avoid the use of !important You can read about it here. Here several highlights why not to use !important:

    1.Encourages sloppy, poorly thought-out code

    2.Creates code that is less maintainable

    3.Overrides styles declared in user style sheets, thus degrading accessibility

提交回复
热议问题