Relative padding is relative to what?

后端 未结 3 1982
甜味超标
甜味超标 2021-01-01 18:13

If I style an

element with padding: 1.2em or padding: 10%, is that relative to the:

  1. font-size of the &l

3条回答
  •  有刺的猬
    2021-01-01 18:44

    "em" units are always in reference to font size. See http://w3schools.com/cssref/css_units.asp for a reference of CSS units.

提交回复
热议问题