我可以设置相对于页面大小的字体大小吗? [英] Can I set font-size relative to page size?
问题描述
有没有办法使 font-size
相对于页面的大小?将百分比应用为单位是指标准字体大小(如12px的90%,而不是页面的90%!)。这与大多数其他标签的行为不同。
Is there a way to make font-size
relative to the size of the page? Applying percentage as unit refers to the standard font size (like 90% of 12px, not 90% of the page!). This is different from the behaviour of most of the other tags.
还可以使用字体使页面缩放吗?我应该依靠 em
?
Any way to make the page 'scale up and down' also with fonts? Should I rely on em
?
谢谢
推荐答案
如果你想要你的页面缩放和保持某种程度的自身,框和字体,然后在 em
中设置它会很好。
If you'd like your page to scale up and down and keep some sort of scale to itself, the boxes and the font, then setting it out in em
would be fine.
该方法将允许页面的字体和框的缩放以相对于彼此的大小增长,并且希望不会有事物超出边界和边界。
That method will allow for the scaling of fonts and boxes of the page to grow at a relative size to one another and hopefully not have things falling out of bounds and borders.
这篇关于我可以设置相对于页面大小的字体大小吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!