Advertisement
contatowellington

Untitled

Apr 28th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <script src="jquery.min.js"></script>
  5. <script src="jquery.textfill.js" ></script>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <link href="https://fonts.googleapis.com/css?family=VT323|Happy+Monkey" rel='stylesheet' type='text/css' />
  8. <link href="css/index.css" rel="stylesheet" type="text/css"/>
  9. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
  10. <title>Untitled Document</title>
  11. </head>
  12.  
  13. <body>
  14. <div class='demo' style='width:40px;height:30px;'>
  15. <span>teste</span>
  16. </div>
  17. <script>
  18. $(function(){
  19. $('.textfill').textfill({
  20. maxFontPixels: 36, // sizing up the text as big as possible to this setting
  21. minFontPixel: 4, // minimal font size
  22. innerTag: 'span', // by default all <span/>s' font size in $(selector) will be changed to fill.
  23. callback: null, // callback when each element's (innerTag) font size is resized.
  24. success: null, // callback when a resizing is done
  25. fail: null, // callback when a resizing is failed
  26. complete: null, // callback when all elements are done.
  27. widthOnly: false, // only resizing for width restraint, this is intentionally used with CSS white-space: nowrap for header tags.
  28. explicitWidth: null, // explicit dimension
  29. explicitHeight: null, // explicit dimension
  30. changeLineHeight: false // resize line-height of parent
  31. });
  32. });
  33. </script>
  34. </body>
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement