Created
October 3, 2010 02:43
-
-
Save landlessness/608211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>Font Size Experiments</title> | |
| <style type="text/css"> | |
| span {margin:0;padding:0;} | |
| </style> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> | |
| <script> | |
| $(document).ready(function(){ | |
| for(i=0;i<500;i++) | |
| { | |
| $('#experiments').append('<span class="experiment" style="font-size:'+i+'px;" id="lorem_'+i+'">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do</span><br/>'); | |
| } | |
| $('.experiment').each(function(index) { | |
| $('#results').append($(this).css('font-size')+','+$(this).width()+'\n'); | |
| }); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <pre id="results"></pre> | |
| <div id="experiments"></div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment