网页特效的代码,在美化网页时有很大的作用

源代码在线查看: 打字效果的带链接的新闻标题.txt

软件大小: 246 K
上传用户: __catcher
关键词: 代码 美化
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
				打字效果的带链接的新闻标题
				
				
				body{font-size:14px;font-weight:bold;}
				
				
				
				最新内容:
				
								var NewsTime = 2000;	//每条新闻的停留时间
				var TextTime = 50;		//新闻标题文字出现等待时间,越小越快
				
				var newsi = 0;
				var txti = 0;
				var txttimer;
				var newstimer;
				
				var newstitle = new Array();	//新闻标题
				var newshref = new Array();		//新闻链接
				
				newstitle[0] = "关于本站的相关说明";
				newshref[0] = "#";
				
				newstitle[1] = "本站控制面板的使用方法介绍";
				newshref[1] = "#";
				
				newstitle[2] = "添加了部分教程文章充实内容";
				newshref[2] = "#";
				
				newstitle[3] = "完成留言板的修改";
				newshref[3] = "#";
				
				newstitle[4] = "上千个精致特效持续添加中";
				newshref[4] = "#";
				
				function shownew()
				{
					//code by haiwa @2005-10-21 www.51windows.net
					var endstr = "_"
					hwnewstr = newstitle[newsi];
					newslink = newshref[newsi];
					if(txti==(hwnewstr.length-1)){endstr="";}
					if(txti>=hwnewstr.length){
						clearInterval(txttimer);
						clearInterval(newstimer);
						newsi++;
						if(newsi>=newstitle.length){
							newsi = 0
						}
						newstimer = setInterval("shownew()",NewsTime);
						txti = 0;
						return;
					}
					clearInterval(txttimer);
					document.getElementById("HotNews").href=newslink;
					document.getElementById("HotNews").innerHTML = hwnewstr.substring(0,txti+1)+endstr;
					txti++;
					txttimer = setInterval("shownew()",TextTime);
				}
				shownew();
				//-->
				
				
							

相关资源