下面的工具允许您从像素计算em大小(反之亦然).
在下表中,选择以像素为单位的正文字体大小(PX),以显示完整的“PX到em和百分比”转换表.
提示:默认字体大小通常为16px.
px | em | 百分比 |
---|---|---|
5px | 0.31em | 31.25% |
6px | 0.38em | 37.50% |
7px | 0.44em | 43.75% |
8px | 0.50em | 50.00% |
9px | 0.56em | 56.25% |
10px | 0.63em | 62.50% |
11px | 0.69em | 68.75% |
12px | 0.75em | 75.00% |
13px | 0.81em | 81.25% |
14px | 0.88em | 87.50% |
15px | 0.94em | 93.75% |
16px | 1.00em | 100.00% |
17px | 1.06em | 106.25% |
18px | 1.13em | 112.50% |
19px | 1.19em | 118.75% |
20px | 1.25em | 125.00% |
21px | 1.31em | 131.25% |
22px | 1.38em | 137.50% |
23px | 1.44em | 143.75% |
24px | 1.50em | 150.00% |
25px | 1.56em | 156.25% |
像素是静态测量,而百分比和EM是相对测量值.EM或百分比的大小取决于其父级.如果正文的文本大小为16像素,则150%或1.5EM为24像素(1.5*16).查看更多CSS单位
评论区