域名注册
|
虚拟主机
|
数据库
|
设为主页
|
加入收藏
|
天诚搜索
|
RSS
网站套餐
Package
基础特惠型网站
企业标准型网站
企业大户型网站
商务政务型网站
功能单项报价表
最新推荐
Recommended
4年网络创业经历
Dreamweaver表格经验谈
61.183.41.123数据重新上传通…
局域网arp病毒
用途相似的标签
CSS网页标准制作关于网页表单…
中国互联网13年大事记
ECSHOP 显示指定分类下的文章…
您现在的位置:
天诚世纪
>>
技术中心
>>
网页特效
>>
窗口特效
>> 正文
带颜色的欢迎窗口
作者:
天诚世纪
更新时间:2009-6-23 10:54:30
来源:
天诚世纪
以下是HTML网页特效代码,点击运行按钮可查看效果:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>网页特效|tc-21.com|---带颜色的欢迎窗口</title> </head> <body> <script language="javascript"> var IE5=(document.getElementById && document.all)? true : false; var W3C=(document.getElementById)? true: false; var currIDb=null, currIDs=null, xoff=0, yoff=0; zctr=0; totz=0; function trackmouse(evt){ if((currIDb!=null) && (currIDs!=null)){ var x=(IE5)? event.clientX+document.body.scrollLeft : evt.pageX; var y=(IE5)? event.clientY+document.body.scrollTop : evt.pageY; currIDb.style.left=x+xoff+'px'; currIDs.style.left=x+xoff+10+'px'; currIDb.style.top=y+yoff+'px'; currIDs.style.top=y+yoff+10+'px'; return false; }} function stopdrag(){ currIDb=null; currIDs=null; NS6bugfix(); } function grab_id(evt){ xoff=parseInt(this.IDb.style.left)-((IE5)? event.clientX+document.body.scrollLeft : evt.pageX); yoff=parseInt(this.IDb.style.top)-((IE5)? event.clientY+document.body.scrollTop : evt.pageY); currIDb=this.IDb; currIDs=this.IDs; } function NS6bugfix(){ if(!IE5){ self.resizeBy(0,1); self.resizeBy(0,-1); }} function incrzindex(){ zctr=zctr+2; this.subb.style.zIndex=zctr; this.subs.style.zIndex=zctr-1; } function createPopup(id, title, width, height, x , y , isdraggable, boxcolor, barcolor, shadowcolor, text, textcolor, textptsize, textfamily ){ if(W3C){ zctr+=2; totz=zctr; var txt=''; txt+='<div id="'+id+'_s" style="position:absolute; left:'+(x+10)+'px; top:'+(y+10)+'px; width:'+width+'px; height:'+height+'px; background-color:'+shadowcolor+'; filter:alpha(opacity=50); visibility:visible"> </div>'; txt+='<div id="'+id+'_b" style="border:outset '+barcolor+' 2px; position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; overflow:hidden; height:'+height+'px; background-color:'+boxcolor+'; visibility:visible">'; txt+='<div style="width:'+width+'px; height:16px; background-color:'+barcolor+'; padding:0px; border:1px"><table cellpadding="0" cellspacing="0" border="0" width="'+(IE5? width-4 : width)+'"><tr><td width="'+(width-20)+'"><div id="'+id+'_h" style="width:'+(width-20)+'px; height:14px; font: bold 12px sans-serif; color:'+textcolor+'"> '+title+'</div></td><td align="right"><a onmousedown="document.getElementById(\''+id+'_s\').style.display=\'none\'; document.getElementById(\''+id+'_b\').style.display=\'none\';return false"><img src="/images/closeb.gif" border="0" height="15" width="15"></a></td></tr></table></div>'; txt+='<div id="'+id+'_ov" width:'+width+'px; style="margin:2px; color:'+textcolor+'; font:'+textptsize+'pt '+textfamily+';">'+text+'</div></div>'; document.write(txt); this.IDh=document.getElementById(id+'_h'); this.IDh.IDb=document.getElementById(id+'_b'); this.IDh.IDs=document.getElementById(id+'_s'); this.IDh.IDb.subs=this.IDh.IDs; this.IDh.IDb.subb=this.IDh.IDb; this.IDh.IDb.IDov=document.getElementById(id+'_ov'); if(IE5){ this.IDh.IDb.IDov.style.width=width-6; this.IDh.IDb.IDov.style.height=height-22; this.IDh.IDb.IDov.style.scrollbarBaseColor=boxcolor; this.IDh.IDb.IDov.style.overflow="auto"; }else{ this.IDh.IDs.style.MozOpacity=.5; } this.IDh.IDb.onmousedown=incrzindex; if(isdraggable){ this.IDh.onmousedown=grab_id; this.IDh.onmouseup=stopdrag; }}} if(W3C)document.onmousemove=trackmouse; if(!IE5 && W3C)window.onload=NS6bugfix; createPopup( 'box3', '欢迎光临' , 288, 90, 275, 155, true, 'FF9966' , '000000' , '800000' , '欢迎光临网页特效观止 网络因你而精彩' , 'FFFFFF' , 9 , '宋体'); </script> </body> </html> <a href="/ITCenter/effect/">.</a>
[提示:可先修改代码再按运行]
本文链接:http://www.tc-21.com/ITCenter/200906/20090623105430.html
上一篇文章:
很有意思的跳出窗口
下一篇文章: 没有了
更多关于
窗口特效
的新闻
相关文章
很有意思的跳出窗口
关闭窗口
限时广告窗口
卷动公告窗口
自动关闭焦点窗口
非常酷的飞舞窗口
进入一个全屏幕窗口
随同主窗口同时弹出的附加小窗口
::::::
网页模板
|
建站指导
|
视频教程
|
图片中心
|
在线咨询
|
网站运营
|
网站推广
|
图片素材
::::::
CopyRight 2007 All Rights Reserved 天诚世纪 版权所有
鄂ICP备12000046号
联系电话:18995527083 18995527081 QQ:448163207 32301667 Email:my_tc@126.com
::::::搜索关键字:
武汉网站制作
|
武汉做网站
|
武汉网站建设
|
武汉网页制作
|
天诚世纪
|
武汉网页制作公司
|
网页模板
|::::::