html中长度怎么表示?html中几种常见长度表示方法


当前第2页 返回上一页

px to em:Example: 12px / 16px = .75em
px to %:Example: 12px / 16px * 100 = 75%
px to pt:Example: 16px * 72 (72 points = 1 inch) / 96 (96 pixels per inch in Windows, 72 in Mac) = 12pt
em to px:Example: .75em * 16px = 12px
em to %:Example: .75em * 100 = 75%
% to px:Example: 75 * 16px / 100 = 12px
% to em:Example: 75 / 100 = .75em
pt to px:Example: 12pt * 96ppi / 72ppi = 16px

PixelsEMsPercentPoints
6px0.375em37.5%5pt
7px0.438em43.8%5pt
8px0.5em50%6pt
9px0.563em56.3%7pt
10px0.625em62.5%8pt
11px0.688em68.8%8pt
12px0.75em75%9pt
13px0.813em81.3%10pt
14px0.875em87.5%11pt
15px0.938em93.8%11pt
16px1em100%12pt
17px1.063em106.3%13pt
18px1.125em112.5%14pt
19px1.188em118.8%14pt
20px1.25em125%15pt
21px1.313em131.3%16pt
22px1.375em137.5%17pt
23px1.438em143.8%17pt
24px1.5em150%18pt

最后pCSS5推荐使用PX像素为单位布局网页:

个人认为现在用px做字体单位在IE下无法用浏览器字体缩放的功能的缺点已经不再是那么重要了。因为新版本ie7,ie8都已经支持整个网页的缩放功能,包括火狐默认也是缩放整个网页,而不是缩放css字体,没那么单纯的缩放字体大小还有什么重大的意义吗?

更多相关教程请访问:http://www.php.cn/course/list/11.html

以上就是对html中长度怎么表示?html中几种常见长度表示方法的全部介绍,如果您想了解更多有关html教程,请关注PHP中文网。

以上就是html中长度怎么表示?html中几种常见长度表示方法的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

html中长度怎么表示?html中几种常见长度表示方法

更多相关阅读请进入《html长度表示》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...