演示 http://gong.88qq.com/88qq_468-60-lun.htm

CODE:
[Copy to clipboard]
<SCRIPT language=JavaScript1.2>
<!--
var scrollerwidth=470
var scrollerheight=60
var scrollerbgcolor='#cccccc'
var pausebetweenimages=10000
var waitingtime=20
var slideimages=new Array()
slideimages[0]='<iframe src="http://gong.88qq.com/88qq_468-60-5.htm" width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[1]='<iframe src="http://gong.88qq.com/88qq_468-60-2.htm" width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[2]='<iframe src="http://gong.88qq.com/88qq_468-60-1.htm" width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[3]='<iframe src="http://gong.88qq.com/88qq_468-60-4.htm" width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[4]='<iframe src="http://gong.88qq.com/88qq_468-60-3.htm" width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
slideimages[5]='<iframe src="http://gong.88qq.com/88qq_468-60-6.htm" width="468" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>'
if (slideimages.length>1)
i=2
else
i=0
function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",waitingtime)
}
else{
tlayer.top=scrollerheight
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",waitingtime)
}
else{
tlayer2.top=scrollerheight
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2)",pausebetweenimages)
return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("move3(tdiv)",waitingtime)
}
else{
tdiv.style.pixelTop=scrollerheight
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2)",pausebetweenimages)
return
}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("move4(second2)",waitingtime)
}
else{
tdiv2.style.pixelTop=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}}
function startscroll(){
if (document.all){
move3(first2)
second2.style.top=scrollerheight
}
else if (document.layers){
move1(document.main.document.first)
document.main.document.second.top=scrollerheight+5
document.main.document.second.visibility='show'
}}
window.οnlοad=startscroll
//-->
</SCRIPT>
<ILAYER id=main bgcolor="&amp;{scrollerbgcolor};"
height="&amp;{scrollerheight};" width="&amp;{scrollerwidth};"><LAYER id=first
width="&amp;{scrollerwidth};" top="1" left="0">
<SCRIPT language=JavaScript1.2>
if (document.layers)
document.write(slideimages[0])
</SCRIPT>
</LAYER><LAYER id=second width="&amp;{scrollerwidth};" 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:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+'">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')
document.write(slideimages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0">')
document.write(slideimages[1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</span>')
}
//-->
</SCRIPT>

不错的向上滚动广告代码相关推荐

  1. 基于JS实现新闻列表无缝向上滚动实例代码

    当新闻较多,并且空前有限的时候,使用滚动是一个不错的选择,本章节就通过代码实例介绍一下如何实现此效果. 代码实例如下: <!DOCTYPE html> <html> <h ...

  2. 图片向上滚动字幕代码html,如何通过制作滚动字幕的软件实现这种片尾的向上滚动字幕效果...

    如何制作滚动字幕 特殊滚动类字幕制作 向上向下向左向右滚动字幕制作效果 含拖动和消失全程 真是酷B了爽呆了,赶快学习吧! 电影.连续剧等影视作品片尾,都会在播放片尾曲时,出现向上滚动的字幕,显示演员表 ...

  3. 向上来回无缝滚动html,移动手机端H5无缝间歇平滑向上滚动js代码

    在没结合css3的transform实现平滑过渡前,我都是用的jquery的animate方法,此方法在PC端基本看不出来有稍微卡顿的现象,但是在性能不高的手机上使用该方法,就会有明显的卡顿现象,不够 ...

  4. Javascript设置滚动条向上滚动的方法;JS设置滚动条滚动的代码

    很久就没有碰前端的后果就是,自己被公司叫来帮忙自己结果啥都会,但是就想不起怎么操作 画布哆嗦 咱们直接来看代码 重点一:获取滚动条Y轴的数据 这个方法有很多,我就不一一讲述了,毕竟结果都一样就好 直接 ...

  5. 网页图片无缝循环滚动html代码

    图片循环滚动代码 图片无缝滚动代码 先介绍一下它的实现思路:一个设定宽度并且隐藏超出它宽度的内容的容器demo,里面放demo1和demo2,demo1是滚动内容,demo2为demo1的直接克隆,通 ...

  6. HTML滚动文字代码 marquee标签

     HTML滚动文字代码marquee标签 <marquee style="WIDTH: 388px; HEIGHT: 200px"scrollamount="2 ...

  7. 企业建站代码--HTML滚动文字代码(垂直)

    <marquee style="WIDTH: 388px; HEIGHT: 200px" scrollamount="2" direction=" ...

  8. Android之高仿京东APP首页“京东快报”自动向上滚动的广告条

    转载请标明出处: http://blog.csdn.net/hai_qing_xu_kong/article/details/51013562 本文出自:[顾林海的博客] ##前言 上次在京东APP上 ...

  9. 仿京东首页的京东快报,自动向上滚动的广告条

    向上滚动的广告条 实现原理 起初看到这个效果时,第一个想法就是向上移动动画+定时器,但当我准备写时发现,滚动时上下文字都是逐渐出来的(有点像滑动的),如果用动画的话不行,如果用滑动的话,那就是List ...

最新文章

  1. nginx 0.8.x + PHP 5.2.13 胜过apache十倍的web服务器
  2. 02_clickhouse安装,卸载,启动/关闭服务,交互式命令(数据库创建,数据导入,查询),批模式数据导入,MySQL接口操作ClickHouse,DBeaver可视化工具安装与使用(学习笔记)
  3. ios开发之.pch文件的使用
  4. Android wifi驱动的移植 realtek 8188
  5. python能熔断吗_在大型项目上,Python 是个烂语言吗?
  6. C#相关控件使用总结
  7. 苹果充电器怎么辨别真假_9款热门充电器盘点——苹果、Anker、Thinkplus、紫米、小米、锤子,谁更值得买?...
  8. Linux 操作系统原理介绍
  9. C++线程安全单例类最全总结
  10. Android Window/Window Z-Order/Surface/SurfaceView
  11. Windows下Appium环境搭建小结
  12. win10无线断开无法连接服务器,简单几步解决win10wifi一直断开连接不上的问题
  13. Lora入门(1)—— PingPong测试(CubeMX篇)
  14. 如何理解开仓与平仓规则?
  15. PLSQL7配置免安装Oracle客户端
  16. 《人生哲理》二.人生苦短,别懂得太晚了...
  17. android限制app运行时间限制,android app 限制app使用时间
  18. 惠州市有哪些学计算机的学校,惠州有哪些好学校?
  19. M5Product: Self-harmonized Contrastive Learning for E-commercial Multi-modal Pretraining 论文解读
  20. TransactionScope使用(二)——msdtc不可用

热门文章

  1. 什么是 Python 自省?
  2. ajax ★ ★ ★ ★ ★
  3. find命令基本使用一览
  4. win7和Ubuntu16.04之间相互远程控制
  5. VS2005代码格式化
  6. Visual Studio Code 编辑器使用
  7. 将JsonObject转换成HashMap
  8. ApacheCN PythonWeb 译文集 20211028 更新
  9. 数据结构思维 第五章 双链表
  10. 计蒜客挑战难题:A+B+C问题