简体   繁体   English

如何根据浏览器按比例调整文本大小?

[英]How to resize text proportionally to browser?

I want to change font-size: according to browser resize text font should change. 我要更改字体大小:根据浏览器调整字体大小应更改字体。 Please help. 请帮忙。

Prowla's answer works but I find it better to use mediaqueries since it's more light weight, easy to manage and it allows you to adept even more things then just the font-size really easy. Prowla的答案行得通,但我发现使用媒体查询更好,因为它重量更轻,易于管理,并且可以让您熟练掌握甚至比字体大小还要简单的更多内容。

http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ http://css-tricks.com/snippets/css/media-queries-for-standard-devices/

Well, if you don't need to worry about browser support, you can use 'vh', 'vw', or 'vmin'. 好吧,如果您不需要担心浏览器支持,则可以使用“ vh”,“ vw”或“ vmin”。 Chris Coyier has explained it in http://css-tricks.com/viewport-sized-typography/ 克里斯·科耶尔(Chris Coyier)在http://css-tricks.com/viewport-sized-typography/中进行了解释

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM