cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
                      <title>Interactive Typography Effects with HTML5</title>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
     
        <link rel="stylesheet" type="text/css" href="http://tympanus.net/Tutorials/InteractiveTypographyEffects/css/demo.css" />
        <link rel="stylesheet" type="text/css" href="http://tympanus.net/Tutorials/InteractiveTypographyEffects/css/style.css" />
		<script type="text/javascript" src="http://tympanus.net/Tutorials/InteractiveTypographyEffects/js/banner2.js"></script>
		<script type="text/javascript" src="http://www.google.com/jsapi"></script>
		<script type="text/javascript" src="http://tympanus.net/Tutorials/InteractiveTypographyEffects/js/modernizr.custom.41769.js"></script>

        <div class="container">
            <div class="header">
                <a href="http://tympanus.net/Tutorials/AnimatedButtons/">
                    <strong>&laquo; Previous Demo: </strong>Animated Buttons with CSS3
                </a>
				<span class="right">
					<a href="http://tympanus.net/codrops/2011/11/09/interactive-html5-typography/">
						<strong>Back to the Codrops Article</strong>
					</a>
				</span>
				<div class="clr"></div>
            </div>
            <h1>Interactive Typography Effects<br /><span> with HTML5</span></h1>
          
          <center><p  style="color: black; font: 20pt;"><span style="color: red;"> NOTE </span>: Put cursor on the image to see typography animation effects ... it is like boxing!</p></center><br>

            <div class="more">
                <ul>
                    <li><a href="http://tympanus.net/Tutorials/InteractiveTypographyEffects/index.html">Demo 1</a></li>
                    <li class="selected"><a href="http://tympanus.net/Tutorials/InteractiveTypographyEffects/index2.html">Demo 2</a></li>
                    <li><a href="http://tympanus.net/Tutorials/InteractiveTypographyEffects/index3.html">Demo 3</a></li>
                    <li><a href="http://tympanus.net/Tutorials/InteractiveTypographyEffects/index4.html">Demo 4</a></li>
                </ul>
            </div>
            <div id="wrapper" class="wrapper">
                <canvas id="canvas-banner" class="inactive">
                    <img src="http://tympanus.net/Tutorials/InteractiveTypographyEffects/images/fallback2.png" />
                </canvas>
            </div>
			<div id="font" class="font-used">
                Font used: 
                <a href="http://www.google.com/webfonts/specimen/Cookie" target="_blank" class="cookie">Cookie</a>
            </div>	
        </div>
		
       <script src="http://tympanus.net/codrops/adpacks/demoad.js"></script>
            
          
!
            
              
/* 

 Interactive Typography Effects with HTML5
With HTML5 gaining popularity, this tutorial outlines what is really just the tip of the iceberg that is interactive design. 
In this tutorial I will go over the development of dynamic, and generative banners to give your website that little extra wow!
<p>SOURCE: Try <a href="http://tympanus.net/Tutorials/InteractiveTypographyEffects/index2.html" target="_blank"><i><b>Interactive Typography Effects with HTML5</b></i></a></p>

http://tympanus.net/codrops/2011/11/09/interactive-html5-typography/

by http://tympanus.net

 */
			
			if(Modernizr.canvas) {
				
				var wrapper = document.getElementById('wrapper'),
					loading	= document.createElement('div');
				
				loading.className = 'loading';
				loading.setAttribute('id','loading');
				loading.innerHTML = 'Loading...';

				wrapper.appendChild(loading);
				
				google.load('webfont','1');
				google.setOnLoadCallback(function() {
					WebFont.load({
						google: {
							families: ['Cookie']
						},
						/* Called when each requested web font has finished loading. The fontFamily parameter is the name of the font family, and fontDescription represents the style and weight of the font. */
						active: function(fontFamily, fontDescription) {
							setTimeout(function() {
								
								loading.style.display = 'none';
								
								var banner = new Banner();
								banner.initialize('canvas-banner');
								
								document.getElementById('font').style.display = 'block';
								
							}, 1000);
						},
						inactive: function() {
							
							// google font not loaded, we will use the default font : Arial (set in baner.js file)
							loading.style.display = 'none';
							
							var banner = new Banner();
							banner.initialize('canvas-banner');
							
						}
					});
				});
				
			}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console