Why em instead of px?

后端 未结 15 1368
闹比i
闹比i 2020-11-22 06:38

I heard you should define sizes and distances in your stylesheet with em instead of in pixels. So the question is why should I use em instead of px when defining styles in c

15条回答
  •  被撕碎了的回忆
    2020-11-22 07:15

    Avoid em or px use rem instead becuase its easier to find the computed value. But between em and px, px is better because em is hard to debug.

提交回复
热议问题