1 CSS点等于CSS像素的75%吗? [英] Is 1 CSS point equal to 75% to a CSS Pixel?

查看:124
本文介绍了1 CSS点等于CSS像素的75%吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解当今 CSS像素与CSS点之间的关系,我读到的是一个css点是3/4像素.那是对的吗?而且我可以忽略旧的想法,因为分辨率和物理显示器尺寸的不同,1pt会是1in的1/72.

I'm trying to understand the how CSS pixels relates to CSS points nowadays and what I've read is that one css point is a 3/4 pixel. Is that correct? And I can ignore the old idea that 1pt would be 1/72 of 1in because of difference in resolution and physical monitor sizes.

如果我想将css点转换为像素,那么公式可能看起来像这样? Xpt/75 * 100 = Ypx

If I want to convert css points to pixels a formula could look like this then? Xpt/75*100 = Ypx

如果要将像素转换为点,则公式可能如下所示:Xpx -25%= Ypt

And if want to convert pixels to points the formula could look like this: Xpx -25% = Ypt

推荐答案

这取决于您的屏幕分辨率以及每英寸有多少像素(通常称为dpi而不是ppi)-正如您所说的1pt是1/72一英寸.

It depends on your screen resolution and how many pixels per inch you have (often referred to as dpi instead of ppi) - as you say 1pt is 1/72 of an inch.

由于大多数显示器为96dpi,这意味着1pt = 72/96 = 0.75像素

As most monitors are 96dpi that means that 1pt = 72 / 96 = 0.75 pixels

这篇关于1 CSS点等于CSS像素的75%吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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