这是让你没话说!去看看就知道了!别忘了有好的东西给我哦!

源代码在线查看: 跟随鼠标的旋转文字.txt

软件大小: 5 K
上传用户: arnoldzhw
关键词:
下载地址: 免注册下载 普通下载 VIP

相关代码

				以下代码加入《BODY》《/BODY》之间
				 
				if (document.all) { 
				yourLogo = "跟随鼠标的旋转文字 "; 
				logoFont = "宋体"; 
				logoColor = "red"; 
				yourLogo = yourLogo.split(''); 
				L = yourLogo.length; 
				TrigSplit = 360 / L; 
				Sz = new Array() 
				logoWidth = 100; 
				logoHeight = -30; 
				ypos = 0; 
				xpos = 0; 
				step = 0.03; 
				currStep = 0; 
				document.write(''); 
				for (i = 0; i < L; i++) { 
				document.write('				+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;' 
				+'color:'+logoColor+';text-align:center">'+yourLogo[i]+''); 
				} 
				document.write(''); 
				function Mouse() { 
				ypos = event.y; 
				xpos = event.x - 5; 
				} 
				document.onmousemove=Mouse; 
				function animateLogo() { 
				outer.style.pixelTop = document.body.scrollTop; 
				for (i = 0; i < L; i++) { 
				ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180); 
				ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180); 
				Sz[i] = ie[i].style.pixelTop - ypos; 
				if (Sz[i] < 5) Sz[i] = 5; 
				ie[i].style.fontSize = Sz[i] / 1.7; 
				} 
				currStep -= step; 
				setTimeout('animateLogo()', 20); 
				} 
				window.onload = animateLogo; 
				} 
							

相关资源