⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 旋转的球!.txt

📁 这个是 Java Script特效(新),
💻 TXT
字号:
先将下列代码复制到<head></head>之间:
<SCRIPT language=javascript>
<!--

var  x, y, x2, y2, ang, timer1;
var pi = Math.PI;
var piA = pi / 30;

function startAni() 
{	
	i = 0;
	ang = 0;
	x = document.body.offsetWidth / 2;
	y = document.body.offsetHeight / 2;
	
	x2 = document.body.offsetWidth / 2;
	y2 = document.body.offsetHeight / 2;	
	timer1=1;

	startAnim();
}

function startAnim() 
{
	var rAng;

	if( timer1 )
	{

		divB1.style.visibility = "hidden";		
		divB1.style.left =  x;
		divB1.style.top =  y;			
			
		divB2.style.visibility = "hidden";		
		divB2.style.left =  x2;
		divB2.style.top =  y2;				

		ang +=  2 * piA % 180;
		rAng = Math.round(ang);

			
			
		x =  Math.round( document.body.offsetWidth / 2  + 60 * Math.cos(ang) + 22 * Math.cos( ang )  );
		y =  Math.round( document.body.offsetHeight / 2 + 30 * Math.sin(ang) +30 * Math.sin( ang  ) ) ;
		
		x2 =  Math.round( document.body.offsetWidth / 2  - 60 * Math.cos(ang) - 22 * Math.cos( ang )  );
		y2 =  Math.round( document.body.offsetHeight / 2 - 60 * Math.sin(ang) - 30 * Math.sin( ang  ) ) ;
		timer1 = setTimeout( "startAnim()", 50 );

		divB1.style.visibility = "visible";
		divB2.style.visibility = "visible";
	}

}

// use this if you want to turn the animation off
// you could hook it to a button or whatever
function stopAni() 
{
	timer1=null;
}

function window_onload() 
{
	startAni();
}

//-->
</SCRIPT>



再将下列代码复制到<body></body>之间:
<BODY bgColor=#ffffff 
onload="return window_onload()">
<DIV id=divB1 style="POSITION: absolute; VISIBILITY: hidden; Z-INDEX: 2" 
name="divB1"><IMG height=32 src="globe1.gif" width=32> </DIV>
<DIV id=divB2 style="POSITION: absolute; VISIBILITY: hidden; Z-INDEX: -2" 
name="divB2"><IMG height=32 src="globe2.gif" width=33> </DIV>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -