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

📄 zoom.html

📁 java脚本即用特效源码从入门到精通帮你渡过难关
💻 HTML
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
/*If you want the text to appear differently on another place on the page
or anything set that in the style tag of the zoom layer. 
以下是你需要编辑的内容,只要改变显示的文字即可:									
First the text: (it will stop and fade/change the colors on the last one)*/
	text = new Array("欢迎","访问","我们的" , "主页", "欢迎访问我们的主页");
//set the number of text's
	var numText = 5;
//Now the colors:
//all you have to do is set the color you want to have in here: 
//(the first color will be the color that the text is when it zooms.)
	color = new Array("red" , "orange" , "yellow" , "green" , "blue" , "indigo" , "violet" , "darkorange");
//set the number of colors:
	var numColors = 8;
//set the size you want the zoom to end at:
	var endSize = 48;
//Set the speed you want it to zoom in (in milliseconds)
	var Zspeed = 60;
//Set the speed you want it too change colors in
	var Cspeed = 60;
//Set font
	var font = 'Arial Black';
//do you want it to hide when its done? (true or false)
	var hide = false;

/*以下不必改动*/
var size = 10;
var gonum = 0;
/*浏览器检测和设定参数*/
if (document.all) {
		n = 0;
		ie = 1;
		zoomText = "document.all.zoom.innerText=text[num]";
		zoomSize = 'document.all.zoom.style.fontSize=size';
		closeIt = "";
		fadeColor = "document.all.zoom.style.color=color[num]";
	}
if (document.layers) {
		n = 1;
		ie = 0;
		zoomText = "";
		zoomSize = "document.zoom.document.write('<p align=\"center\" style=\"font-family:'+font+'; font-size:'+size+'px; color:'+color[0]+'\">'+text[num]+'</p>')";
		closeIt = "document.zoom.document.close()";
		fadeColor = "document.zoom.document.write('<p align=\"center\" style=\"font-family:'+font+'; font-size:'+endSize+'px; color:'+color[num]+'\">'+text[numText-1]+'</p>')";
	}
/*The functions for zooming text.*/
function zoom(num,fn){
	if (size<endSize){
		eval(zoomText)
		eval(zoomSize)
		eval(closeIt)
   		size+=5;
		setTimeout("zoom("+num+",'"+fn+"')",Zspeed)
	}else{
	 	eval(fn);
	}
}
/*The functions for fading/changing colors on text*/
function fadeIt(num){
	if (num<numColors){
		eval(fadeColor)
		eval(closeIt)
   		num+=1;
		setTimeout("fadeIt("+num+")",Cspeed)
	}else{
		hideIt()
	}
}

/*如下在ZOOM文字后隐藏层*/
function hideIt(){
	if(hide){
		if(ie)document.all.zoom.style.visibility="hidden"
		if(n)document.layers.zoom.visibility="hidden"
	}
}
/*This is the functions that calls the right function...or something :}
####################################################################*/
function init(){
	if(ie){
		document.all.zoom.style.color=color[0]
		document.all.zoom.style.fontFamily=font}
	go(0)
}
function go(num){
	gonum+=1
	size=10
	if(num<numText){
		zoom(num,'go('+gonum+')')
	}else{
		fadeIt(0)
	}
}

//####################################################################

</script>
<style>
<!-- 
.link {

	color : #FFFFFF;
	font-weight : bold;
	text-decoration : none;	
}
A.link:hover {
	color : aqua;
}

A.link:active {
	color : greenyellow;
	text-decoration : none;
	text-transform : uppercase;
}
//-->
</style>
</head>

<body bgcolor="#000000" onLoad="init()" vlink="#FF9933" text="#FFFFFF">
<div id="zoom" align="center" style="position:absolute; top:100"><a href="http://www.sstp.com.cn/computer.htm"></div>

<div style="font-size:16px" align="center"> 
  <p><font size="5" face="ARIAL"> <br>
    <br>
    <br>
    <br>
    <br>
<br>
    <br>
    </font></p>
</div>
</body>
</html>

⌨️ 快捷键说明

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