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