Pixels vs. Points in HTML/CSS

后端 未结 9 1466
你的背包
你的背包 2020-11-29 01:06

When creating an HTML page, should I specify things like margins with pixels or with points in CSS?

Is one of them considered to be better practice than

9条回答
  •  天命终不由人
    2020-11-29 01:48

    I think it depends on what you're trying to do.

    I find the key question is does the distance need to resize with the window? Some units are relative, some (like pixels and points) are not - a brief description is here.

    I haven't seen points used much, px seems more common when an absolute measurement is needed.

提交回复
热议问题