Reset/remove CSS styles for element only

前端 未结 14 846
长情又很酷
长情又很酷 2020-11-22 00:52

I\'m sure this must have been mentioned/asked before but have been searching for an age with no luck, my terminology must be wrong!

I vaguely remember a twee

14条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 01:23

    Any chance you're looking for the !important rule? It doesn't undo all declarations but it provides a way to override them.

    "When an !important rule is used on a style declaration, this declaration overrides any other declaration made in the CSS, wherever it is in the declaration list. Although, !important has nothing to do with specificity."

    https://developer.mozilla.org/en-US/docs/CSS/Specificity#The_!important_exception

提交回复
热议问题