gpt4 book ai didi

css - 与 'pt' 混淆

转载 作者:行者123 更新时间:2023-11-28 09:45:45 25 4
gpt4 key购买 nike

这几天我在做移动webApp开发,我读了一些关于它的文章,但是描述here把我弄糊涂了。

Points are abstract units, they only make sense in this mathematical coordinate space.

所以这意味着点就像 density-independent pixel ?一些地方使用375pt * 627pt描述iPhone6和很多关于设计使用的文章pt作为一个整体。

以及pt的描述作为 CSS Trick 的 css 单元.

A point is a unit of measurement used for real-life ink-on-paper typography. 72pts = one inch. One inch = one real-life inch like-on-a-ruler. Not an inch on a screen, which is totally arbitrary based on resolution.

我记得有一个像 1px = 0.75pt 这样的公式.所以我不知道他们在谈论哪些要点。

  • 这些是point吗同一个?
  • iPhone6 有375px * 627px css 像素(当设置 initial-scale 为 1.0 时),为什么有些地方使用 pt
  • 号码12pt在设计师的文章中表示 12px

最佳答案

设计师根据 1pt == 1px 的理论进行设计(在 photoshop 中大多数配置都是相同的),但在真实的网络世界中这是不正确的,因为 1 点不是 1 像素.

  • CSS 中的 pt 单位建议仅在页面的打印机版本中使用(因为与英寸的关系)。
  • iPhone6 具有该分辨率,但如果您更改为点数,它有时可能会在大多数设备上崩溃。
  • 也许是,但不要相信那些认为在网络中 ptpx 相同的设计师,那不是真的。

这是一篇来自 W3C 的有趣文章:

https://www.w3.org/Style/Examples/007/units.en.html

关于css - 与 'pt' 混淆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35311600/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com