jQuery字体自适应插件textfit

使用方法:

1、添加js引用

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="js/textfit.js"></script>

2、为需要设置自适应的字体,添加CLASS“textfit”

1
2
3
< div  class = "textfit" >
   textfit.js
</ div >

3、设置最大/最小字体

1
2
3
4
5
< div  class = "textfit"
      data-textfit-min = "10px"
      data-textfit-max = "48px" >
      textfit.js
</ div >

猜你喜欢

转载自blog.csdn.net/wwxthinking/article/details/79139299