网页特效
建站首页
|
广告代码
|
源码下载
|
站长工具
|
字体下载
|
网页模板
|
收藏本站
|
设为首页
网站首页
菜单导航
日期时间
背景图像
图层样式
鼠标键盘
页面窗口
色彩表格
链接文字
表单按钮
计数转换
游戏娱乐
综合实例
特效
热门搜索:
特效代码
js脚本
导航菜单
热点推荐:
英文字体
人民币汇率
dw插件
站长常用软件
alexa排名查询
您的位置:
网页特效
->
背景图像
-> 向上滚动的单行图片滚屏效果网页代码
向上滚动的单行图片滚屏效果网页代码
作者:向上滚动的单行图片滚屏效果 网页特效代码演示 发布时间:2007-11-11 3:35:30 发布人: admin
<script language="JavaScript"> var dde_para = new Array(); var dde_aa = new Array(); var dde_url = document.location.href; var dde_pp = dde_url.split("#")[1]; var jspfile = 1; var para = null; //滚动页面的宽 var scrollwidth = 705; //滚动页面的高 var scrollheight = 120; if(dde_pp!=null && dde_pp.length>0){ dde_para = dde_pp.split("&");} for(i=0; dde_para!=null && i<dde_para.length;i++){ dde_aa = dde_para[i].split("="); eval("var "+dde_aa[0] +"='"+dde_aa[1]+"'");} var car_num = 5; var i=1; //默认滚动时间10秒 var pausebetweenimages=800 * 8; var slideimages=new Array(); //滚动页面1的URL slideimages[0]="<iframe border=0 vspace=0 hspace=0 bgcolor=#888888 Name=union163com align=center marginwidth=0 marginheight=0 framespacing=0 frameborder=0 scrolling=no width="+scrollwidth+" height="+scrollheight+" src='http://web.archive.org/web/20120618202343/http://news.qq.com/photon/08photojdlm1.htm'></iframe>"; //滚动页面2的URL slideimages[1]="<iframe border=0 vspace=0 hspace=0 bgcolor=#888888 Name=union163com align=center marginwidth=0 marginheight=0 framespacing=0 frameborder=0 scrolling=no width="+scrollwidth+" height="+scrollheight+" src='http://web.archive.org/web/20120618202343/http://news.qq.com/photon/08photojdlm2.htm'></iframe>"; function move1(whichdiv){ tdiv=eval(whichdiv) if (tdiv.style.pixelTop>0 && tdiv.style.pixelTop<=car_num){ tdiv.style.pixelTop=0 setTimeout("move1(tdiv)",pausebetweenimages) setTimeout("move2(second2)",pausebetweenimages) return} if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){ tdiv.style.pixelTop-=car_num setTimeout("move1(tdiv)",50)} else{ tdiv.style.pixelTop=scrollheight tdiv.innerHTML=slideimages[0] if (i==slideimages.length-1) i=0 else i++}} function move2(whichdiv){ tdiv2=eval(whichdiv) if (tdiv2.style.pixelTop>0 && tdiv2.style.pixelTop<=car_num){ tdiv2.style.pixelTop=0 setTimeout("move2(tdiv2)",pausebetweenimages) setTimeout("move1(first2)",pausebetweenimages) return} if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){ tdiv2.style.pixelTop-=car_num setTimeout("move2(second2)",50)} else{ tdiv2.style.pixelTop=scrollheight tdiv2.innerHTML=slideimages[1] if (i==slideimages.length-1) i=0 else i++}} function conmouse(){car_num=0;} function cmouseout(){car_num=5;} function startscroll(){ if (document.all){ move1(first2) second2.style.top=scrollheight } else if (document.layers){ move1(document.main.document.first) document.main.document.second.top=scrollheight+5 document.main.document.second.visibility='show'}} //--> </script> <ilayer id="main" height=" && #123;scrollheight};" width=" && #123;scrollwidth};"> <layer name="first" left="0" top="1" width=" && #123;scrollwidth};" id="first"> <script language="JavaScript1.2"> if (document.layers) document.write(slideimages[0]) </script> </layer> <layer id="second" width=" && #123;scrollwidth};" top="0" left="0" visibility="hide"> <script language="JavaScript1.2"> if (document.layers) document.write(slideimages[1]) </script> </layer> </ilayer> <script language="JavaScript1.2"> if (document.all){ document.writeln('<span id="main2" style="position:relative;width:'+scrollwidth+';height:'+scrollheight+';overflow:hiden;background-color:#ffffff">') document.writeln('<div onMouseOver="conmouse()" onMouseOut="cmouseout()" style="position:absolute;width:'+scrollwidth+';height:'+scrollheight+';clip:rect(0 '+scrollwidth+' '+scrollheight+' 0);left:0;top:0">') document.writeln('<div id="first2" style="position:absolute;width:'+scrollwidth+';left:0;top:1;">') document.write(slideimages[0]) document.writeln('</div>') document.writeln('<div id="second2" style="position:absolute;width:'+scrollwidth+';left:0;top:0">') document.write(slideimages[1]) document.writeln('</div>') document.writeln('</div>') document.writeln('</span>')} startscroll(); </script>
向上滚动的单行图片滚屏效果 网页特效代码演示
将本文收藏到QQ书签与更多好友分享
上一篇:文章:
点击图片从而改变网页背景图片网页代码
下一篇:文章:
向右滚动的图片特效网页代码
本类浏览排行 »
搜索页面中的内容
又一款综合搜索引擎代码
标题栏显示当前时间
倒影效果的电子表,显示当前时间
自动记录当前页面最新的更新日期
JS让网页每隔2秒弹出一次对话框
一款超酷的CSS列表排行榜
鼠标悬停放大的纯CSS分页效果
本站推荐文章 »
垂直三栏自适应等高布局
仿QQ消息管理器的文本内容样式
支付宝的控制台动画效果菜单
文字、图片拖曳移动
可拉伸移动的DIV层效果
很酷的图片伸缩放大功能
较好的视觉效果的网页选项卡
CSS实例:通过定义渐变边框给图片加阴影