根据div的大小更改字体大小 [英] Have font size change according to size of div

查看:335
本文介绍了根据div的大小更改字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在里面有一个可抵抗 div 的文字。我希望文本按照 div 更改大小进行缩放。

I have a resisable div with text inside. I want the text to scale as the div changes size.

具体而言,我希望文本具有最大可能的字体大小将使它适合在 div 中。

Specifically, I want the text to have the largest possible font size that will make it fit inside the div.

推荐答案

使用FitText http://fittextjs.com/

Use FitText http://fittextjs.com/

这篇关于根据div的大小更改字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆