Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第 115 期(W3C标准-CSS-语法):CSS 单位 #118

Open
wingmeng opened this issue Sep 23, 2019 · 0 comments
Open

第 115 期(W3C标准-CSS-语法):CSS 单位 #118

wingmeng opened this issue Sep 23, 2019 · 0 comments

Comments

@wingmeng
Copy link
Collaborator

通用单位:

  • px:像素(Pixels),绝对长度单位
  • pt:点(Points),绝对长度单位
  • pc:派卡(Picas),绝对长度单位,默认为浏览器缺省字体大小(16px)
  • em:相对长度单位,相对于当前对象内文本的字体尺寸
  • ex:相对长度单位,相对于字符“x”的高度,通常为字体高度的一半
  • cm:厘米(Centimeters),绝对长度单位
  • mm:毫米(Millimeters),绝对长度单位
  • in:英寸(Inches),绝对长度单位

换算关系:

  • 1pc = 12pt = 16px
  • 1in = 2.54cm = 25.4mm = 72pt = 6pc = 96px

    注:以 72 像素/英寸为基准

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant