Advertisement
Papadopolis

Untitled

Mar 15th, 2012
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4.     <title>TagCanvas example</title>
  5.     <!--[if lt IE 9]><script type="text/javascript" src="http://www.goat1000.com/tagcanvasjs"></script><![endif]-->
  6.     <script src="http://www.goat1000.com/tagcanvas.js?1.14" type="text/javascript"></script>
  7.     <script type="text/javascript">
  8.       window.onload = function() {
  9.             $ = document.getElementsByTagName("canvas");
  10.             try {
  11.                 for(x in $) {
  12.                     if($[x].id.indexOf("myCanvas") !== -1) {
  13.                        
  14.                         y = $[x].id.match(/^myCanvas(\d+)$/)[1];
  15.                        
  16.                         TagCanvas.Start('myCanvas'+y,'tags'+y,{
  17.                                 textColour: '#ff0000',
  18.                                 outlineColour: '#ff00ff',
  19.                                 initial: [0.3,-0.3],
  20.                                 reverse: true,
  21.                                 decel: 1.0,
  22.                                 depth: -0.8,
  23.                                 freezeActive: true,
  24.                                 maxSpeed: 0.05
  25.                             }
  26.                         );
  27.                    
  28.                         TagCanvas.depth = 0.92;
  29.                         TagCanvas.pulsateTo = 0.6;
  30.                         TagCanvas.initial = [0.1,-0.1];
  31.                         TagCanvas.decel = 0.98;
  32.                     }
  33.                 }
  34.             } catch(e) {
  35.                 // something went wrong, hide the canvas container
  36.                 document.getElementById('myCanvasContainer').style.display = 'none';
  37.             }
  38.       };
  39.     </script>
  40.   </head>
  41.   <body>
  42.     <h1>TagCanvas example page</h1>
  43.     <div id="myCanvasContainer">
  44.       <canvas width="300" height="300" id="myCanvas1" style="background-image: url('http://touchingtips.files.wordpress.com/2010/08/heaven_s_rays1.jpg');">
  45.         <p>Anything in here will be replaced on browsers that support the canvas element</p>
  46.       </canvas>
  47.      
  48.       <canvas width="300" height="300" id="myCanvas2" style="background-image: url('http://touchingtips.files.wordpress.com/2010/08/heaven_s_rays1.jpg');">
  49.         <p>Anything in here will be replaced on browsers that support the canvas element</p>
  50.       </canvas>
  51.      
  52.       <canvas width="300" height="300" id="myCanvas3" style="background-image: url('http://touchingtips.files.wordpress.com/2010/08/heaven_s_rays1.jpg');">
  53.         <p>Anything in here will be replaced on browsers that support the canvas element</p>
  54.       </canvas>
  55.      
  56.       <canvas width="300" height="300" id="myCanvas4" style="background-image: url('http://touchingtips.files.wordpress.com/2010/08/heaven_s_rays1.jpg');">
  57.         <p>Anything in here will be replaced on browsers that support the canvas element</p>
  58.       </canvas>
  59.     </div>
  60.     <div id="tags1">
  61.       <ul>
  62.         <li><a href="#">Luz</a></li>
  63.         <li><a href="#">Céu</a></li>
  64.         <li><a href="#">Luzeiros</a></li>
  65.         <li><a href="#">Firmamento</a></li>
  66.       </ul>
  67.     </div>
  68.    
  69.     <div id="tags2">
  70.       <ul>
  71.         <li><a href="#">Cereja</a></li>
  72.         <li><a href="#">Laranja</a></li>
  73.         <li><a href="#">Pêra</a></li>
  74.         <li><a href="#">Mamão</a></li>
  75.       </ul>
  76.     </div>
  77.    
  78.     <div id="tags3">
  79.       <ul>
  80.         <li><a href="#">Caneta</a></li>
  81.         <li><a href="#">Lápis</a></li>
  82.         <li><a href="#">Apontador</a></li>
  83.         <li><a href="#">Grafite</a></li>
  84.       </ul>
  85.     </div>
  86.    
  87.     <div id="tags4">
  88.       <ul>
  89.         <li><a href="#">Que isso</a></li>
  90.         <li><a href="#">Novinha</a></li>
  91.         <li><a href="#">Que isso</a></li>
  92.         <li><a href="#">Gordinha</a></li>
  93.       </ul>
  94.     </div>
  95.   </body>
  96. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement