Is it possible to reset all inherited CSS propeties?

后端 未结 4 910
一个人的身影
一个人的身影 2021-01-19 05:28

How do you reset ALL inherited properties for a class in a CSS file? I need to be able to set new properties on elements without pre-defined properties having an effect on i

4条回答
  •  长发绾君心
    2021-01-19 06:10

    You cannot reset css properties, you can overwrite your css properties one by one, nothing automatic so far.

    * {
        property:inherit
        ...
        ... long list of all .css properties ...
        propertyZ:inherit
    }
    

    and maybe (wishing)) comming soon :initial

    See this answer : Reset/remove CSS styles for element only

提交回复
热议问题