Get back default properties after applying a global CSS reset

前端 未结 3 568
难免孤独
难免孤独 2020-12-11 18:57

Some legacy code that I have to build upon, really makes me feel the cons of global CSS reset.

I have the old foo.css that starts with

         


        
3条回答
  •  伪装坚强ぢ
    2020-12-11 19:19

    I would think * {margin: auto} would reset margin (or h1 {margin: auto} if only that element is being reset.), but this will not work for padding. Technically, the spec is for padding to be zero already, however, if a browser implements it otherwise, I don't think there would be a way to reset it.

提交回复
热议问题