Is it possible to reset all inherited CSS propeties?

后端 未结 4 885
一个人的身影
一个人的身影 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:12

    You Cant reset properties, as they will always be inherited

    You can surely Override them by using !important

    ex:

    childselector
    {
       height:auto !important;
    }
    

提交回复
热议问题