PHP Classes

File: doyouremember.html

Recommend this page to a friend!
  Classes of Luis Martinez Ulloa   Vertical Degradé Image   doyouremember.html   Download  
File: doyouremember.html
Role: Auxiliary data
Content type: text/plain
Description: example page
Class: Vertical Degradé Image
Generate image with a color degrade
Author: By
Last change:
Date: 10 years ago
Size: 1,893 bytes
 

Contents

Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>sin título</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Geany 0.20" /> <style> .box { width:50px; height:50px; position: absolute; font-size: 1px; } </style> <script type="text/javascript"> var c=0; var t; var timer_is_on=0; //---//---//---//---//---//---//---//---//---//---//---//---//---//--- function timedCount() { wdiv(c); c=c+1; t=setTimeout("timedCount()",500); } //-----------//-----------//-----------//-----------//-----------//----------- function doTimer() { if (!timer_is_on) { timer_is_on=1; timedCount(); } } //---------------------//---------------------//--------------------- function wdiv (id) { var x = rand(500); var y = rand(500); var w = rand(500); var h = rand(500); var top = randhexrgb(); var bottom = randhexrgb(); midiv = document.createElement("div"); midiv.setAttribute("id","vid" + id); midiv.setAttribute("class","box"); //midiv.appendChild(document.createTextNode("&nbsp;")); midiv.setAttribute("style","left:" + x + "px;top:" + y +"px;width:"+w+"px;height:"+h+"px;" + "background: url(vdeg.php?start="+top+"&stop="+bottom+"&steps="+h+") repeat-x;"); document.getElementById("roots").appendChild(midiv); } //----------//----------//----------//----------//----------//---------- function rand(max) { var val = Math.random() * max; return val; } //-------//-------//-------//-------//-------//-------//-------//------- function randhexrgb() { return Math.floor(Math.random()*16777215).toString(16); } //-------------------------//-------------------------//------------------------- </script> </head> <body onload='doTimer();'> <div id='roots'></div> </body></html>