1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
<SCRIPT language="JavaScript"><!-- Begin
//Things you can alter
yourLogo = " ***BIENVENUE****CHEZ****bigoude***"; //Not less than 2 letters!
logoFont = "verdana";
logoColor = "red";
//Nothing needs altering below!
yourLogo = yourLogo.split('');
L = yourLogo.length;
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 105;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie'+i+'" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse(s) {
dde=(navigator.vendor) ? document.documentElement.childNodes[1] : document.documentElement;
xpos =s.clientX - 5;
ypos =s.clientY;
}
if(navigator.appName.substring(0,3)=="Mic"){
document.documentElement.attachEvent('onmousemove',function(){Mouse(event)});
}
else{
document.documentElement.addEventListener("mousemove", Mouse, false);
}
function animateLogo() {
document.getElementById('outer').style.top = document.body.scrollTop;
for (i = 0; i < L; i++) {
document.getElementById('ie'+i+'').style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
document.getElementById('ie'+i+'').style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = parseInt(document.getElementById('ie'+i+'').style.top) - ypos;
if (Sz[i] < 5) Sz[i] = 5;
document.getElementById('ie'+i+'').style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('animateLogo()', 20);
}
window.onload = animateLogo;
// End -->
</SCRIPT> |
Partager