如何将pt转换为em? [英] How do i convert pt into em?

查看:171
本文介绍了如何将pt转换为em?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将pt转换为em?正如我使用Photoshop来设计模板。软件使用的是文本大小的pt格式。然后,我必须将设计细节传送给开发人员,而且他们始终需要em格式的所有文本大小。
我将此网站 http://pxtoem.com/ 转换为转换,但只有转换px to em。我现在使用的是16磅的基本字体。



我的另一个问题是,pt和px之间是否有任何差异,而不是每英寸和像素的完整形状点数每英寸。因为我检查了16pt大小的高度,只显示了16px的高度。

解决方案

EM是一个相对值。所以转换很简单,只是交叉繁殖。如果身体是16px(1EM),比2EM是32pt和.5EM是8pt。它的作用与百分比相同。一个区别是,百分比是100索引和EM是1索引。

点是毫米的绝对值。一点是1/72英寸。这是因为一分相当于1/12比卡,而1比卡= 1/6英寸。所以1磅= 1/72英寸。

像素代表像素元素。像素是数字图像数据的最小单位,没有实际的物理尺寸。屏幕的像素密度以ppi(像素/英寸)为单位,而打印的图像则以dpi(每英寸的点数)来衡量。像素的大小取决于输出的密度。一个像素可以,但不一定是方形的。在一个LED显示器(低密度)上的10×10像素的图像比在纸上印刷的相同图像(高密度)大得多。因为像素不是'没有物理尺寸,只有在知道目标输出密度的情况下,才能将其转换为任何绝对值。即使如此,你应该记住,现代设备给予用户缩放的能力。



长话短说:像素完美的Photoshop模板已经过时了。如果你设计屏幕,设计元素之间的比例。不是实际的大小。


How do i convert pt into em? As I use Photoshop to design templates. Software is having pt format for the text size.Then I have to transfer the design details to developers, and they always need all the text sizes in em format. I referred this site http://pxtoem.com/ for the conversions, but there is only conversion for px to em. Right now I am using 16 pt for the base font.

My another question is, Is there any difference between pt and px rather than its full form points per inch and pixel per inch.? Because I checked the height of 16pt size, its showing 16px in height only.

解决方案

EM is a relative value. So the conversion is simple just cross multiply. If the body is 16px (1EM), than 2EM is 32pt and .5EM is 8pt. It works the same as percentages. One difference, percentage is 100 indexed and EM is 1 indexed.

Point is a absolute value like millimeter. A point is 1/72 of an inch. This is because a point is equal to 1/12 Pica, and 1 Pica = 1/6 inch. So 1 pt = 1/72 inch.

Pixel stands for pixel element. A pixel is the smallest unit of digital image data and without actual physical size. Screens have their pixel density measured in ppi (pixels per inch), whereas printed images are measured by dpi (dots per inch). The size of pixels depend on density of the output. A pixel can, but doesn't have to be square. An image of 10 x 10px on a LED-display (low density) is much larger than the same image printed on paper (high density).

Because a pixel doesn't have a physical size, converting it to any absolute value is only possible when you know the targeted output density. And even then you should keep in mind that modern devices give the user the ability to zoom.

Long story short: Pixel perfect Photoshop templates are outdated. If you design for screen, design the ratio between the elements. Not the actual size.

这篇关于如何将pt转换为em?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆