Photoshop px 与操作系统 px

发布于 2024-07-24 06:43:24 字数 355 浏览 3 评论 0原文

在将 Photoshop 文件形式的网页设计转换为 html+css 时,我对字体大小感到困惑。 如下图所示,Photoshop 中的 30 像素不等于其他 Windows 程序(Mac 或其他程序上不同?)或浏览器中的 30 像素。 这似乎不受以与默认 72 不同的分辨率创建 Photoshop 图像的影响,并且不受 pt 和 px 之间单位更改的影响。 任何人都可以提示如何设置 Photoshop 使用浏览器 px 单位吗? 替代文本

While converting a webdesign given as a photoshop file to html+css, I got confused with font sizes. As seen on the image below, 30 px in photoshop does not equal 30 px in other Windows programs (different on Mac or others?), or browsers. This seems to be unaffected by creating the photoshop image in different resolutions than 72 which is default, and unaffected by change of units between pt and px. Can anyone hint on how to set photoshop to use browser px units?
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寂寞美少年 2024-07-31 06:43:24

绘图文档中的字体大小是指点,而不是像素。 将 Photoshop 中的字体大小更改为 30pt,它们应该大小相同。

点是 1/72 英寸,等效像素可能取决于显示器的 DPI。 在 96 DPI 下,30pt * 1in/72pt * 96DPI(我的屏幕分辨率)为 40px。 要将像素转换为点,请向后操作,因此 30px * 1in/96px * 72pt/1in = 22.5pt。

因此,将绘制文本大小更改为 22.5,它们应该匹配。

The font size in the paint document refers to points, not pixels. Change the font size in photoshop to 30pt and they should be the same size.

A point is 1/72 of an inch and the pixel equivalent can depend on the DPI of your monitor. At 96 DPI 30pt * 1in/72pt * 96DPI (my screen res) is 40px. To convert pixels to points work backwards so 30px * 1in/96px * 72pt/1in = 22.5pt.

So change the paint text size to 22.5 and they should match up.

随心而道 2024-07-31 06:43:24

将其设置为 96 dpi。

Set it to 96 dpi.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文