Set Scrolling Pictrues in the WebPage
1、图片向上滚动(每次可显示多个图片)
<div id=demo style="OVERFLOW: hidden; HEIGHT: 235px"> <div id=demo1> <table cellspacing=1 cellpadding=0 width="100%" border=0> <tbody> <tr> <td style="height:60px;"><a href="Special/2006_10/Index.html" target=_blank><img height=58 src="Banner/sjds.jpg" width=178 border=0></a></td> </tr> <tr> <td style="height:60px;"><a href="http://vote.dc.cqit.edu.cn" target=_blank><img height=58 src="Banner/hx.gif" width=178 border=0></a></td> </tr> <tr> <td style="height:60px;"><a href="http://vote.dc.cqit.edu.cn/Index.aspx?projectNo=281" target=_blank><img height=58 src="Banner/hhc.gif" width=178 border=0></a></td> </tr> <tr> <td style="height:60px;"><a href="http://dmamh.cqit.edu.cn" target=_blank><img height=58 src="Banner/dmamh.gif" width=178 border=0></a></td> </tr> <tr> <td style="height:60px;"><a href="http://rsc.cqit.edu.cn/ModuleWithItem.aspx?subModuleCode=5160&ModuleCode=4788" target=_blank><img height=58 src="Banner/cpyc.jpg" width=178 border=0></a></td> </tr> </tbody> </table> </div> <div id=demo2></div> </div> <script> var speed=30 demo2.innerHTML=demo1.innerHTML function Marquee(){ if(demo2.offsetTop-demo.scrollTop<=0) demo.scrollTop-=demo1.offsetHeight else{ demo.scrollTop++ } } var MyMar=setInterval(Marquee,speed) demo.οnmοuseοver=function() {clearInterval(MyMar)} demo.οnmοuseοut=function() {MyMar=setInterval(Marquee,speed)} </script> |
2、图片向上滚动(每次只显示一个图片)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <head> <script language="JavaScript"> //下面的行不要编辑/// <body> </layer> <p><script language="JavaScript1.2"> </body> </html> |
3、图片向作滚动(每次可显示多个图片)
<script language="JavaScript"> ns4=(document.layers)?true:false var displayImgAmount=4 //视区窗口可显示个数 var divWidth=130 //每块图片占位宽 var divHeight=84 //每块图片占位高 var startDnum=0 var startDivClipLeft function initDivPlace(){ function mvStart(){ function mvStop(){ function moveLeftDiv(){ startDivClipLeft=parseInt(eval("document.divOuter.document.divAds"+startDnum+".clip.left")) if (startDivClipLeft+moveStep>divWidth){ eval("document.divOuter.document.divAds"+startDnum+".left="+divWidth*displayImgAmount) startDnum=(++startDnum)%imgArr.length startDivClipLeft=moveStep-(divWidth-startDivClipLeft) startDivClipLeft=parseInt(eval("document.all.divAds"+startDnum+".currentStyle.clipLeft")) if (startDivClipLeft+moveStep>divWidth){ eval("document.all.divAds"+startDnum+".style.left="+divWidth*displayImgAmount) startDnum=(++startDnum)%imgArr.length startDivClipLeft=moveStep-(divWidth-startDivClipLeft) if (outHover){ } function writeDivs(){ for (i=0;i<imgArr.length;i++){ for (i=0;i<imgArr.length;i++){ |
<body οnlοad="javascript:mvStart()"> 在相应td位置,输入以下语句:<SCRIPT language="JavaScript">writeDivs();initDivPlace();</SCRIPT> |
Set Scrolling Pictrues in the WebPage相关推荐
- Cocos2d:使用 CCCamera 做滚动效果 (Four Ways of Scrolling with Cocos2D)
原版的:http://www.koboldtouch.com/display/IDCAR/Four+Ways+of+Scrolling+with+Cocos2D There are two class ...
- (转载)Nutch2 WebPage 字段解释
版本: Nutch2.2.1 nutch/conf/gora-hbase-mapping.xml内有webpage表结构 <class name="org.apache.nutch.s ...
- 30个让人兴奋的视差滚动(Parallax Scrolling)效果网站
30个让人兴奋的视差滚动(Parallax Scrolling)效果网站 转载于:https://www.cnblogs.com/momomo/archive/2012/03/02/2377683.h ...
- Android之提示Cannot call this method while RecyclerView is computing a layout or scrolling
1 问题 java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layo ...
- 视差滚动(Parallax Scrolling)技术在网页中应用的精美案例
视差滚动(Parallax Scrolling)是一种独特的网页内容表现形式,其基本原理是让多层背景以不同的速度移动,形成立体的运动效果,带来出色的视觉体验.作为今年网页设计的热点趋势,越来越多的网站 ...
- Andorid Scrolling Activity(CoordinatorLayout详情)
1.new project -> Scrolling Activity 2.Layout xml code activity_scrolling.xml 1 <?xml version=& ...
- CSS: 解决100% 高度失效 height 100% is not working when scrolling down page
原代码: <!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8 ...
- jquery:临时禁止鼠标滚动 How to disable scrolling temporarily?
1. 代码: // left: 37, up: 38, right: 39, down: 40, // spacebar: 32, pageup: 33, pagedown: 34, end: 35, ...
- 视差滚动(Parallax Scrolling)效果的原理和实现
视差滚动(Parallax Scrolling)是指让多层背景以不同的速度移动,形成立体的运动效果,带来非常出色的视觉体验.作为今年网页设计的热点趋势,越来越多的网站应用了这项技术. 可以先看看效果: ...
- 让人兴奋的视差滚动(Parallax Scrolling)效果网站分享
视差滚动(Parallax Scrolling)是指让多层背景以不同的速度移动,形成立体的运动效果,带来非常出色的视觉体验.作为今年网页设计的热点趋势,越来越多的网站应用了这项技术.今天这篇文章就与大 ...
最新文章
- 《css世界》的那些实用技巧
- 第三模块:面向对象(目录)
- c语言文件归并问题_C语言 | 选择法对10个数排序
- 恢复联想键盘F1-F12标准模式
- mysql Insert on duplicate引发的死锁
- mysql long类型_怒肝两个月MySQL源码,我总结出这篇2W字的MySQL协议详解(超硬核干货)!!...
- 腾讯 tars java_腾讯TARS开源团队郑苏波:腾讯微服务开发框架的源码剖析
- SpringMvc-HandlerMapping/RequestCondition
- 2006年上半年开发心得
- qt使用QZxing生成二维码
- 计算机系统的基本组成
- 服务器搭建centos7系统操作过程(使用系统盘搭建centos7系统)
- 项目中 前后台接口 请求项目移植的问题
- PHP小V脸蛋白线,HPH小v脸蛋白线好不好用?HPH小v脸蛋白线怎么用
- N-Tiers开发方式(为何使用COM+组件的撰写商业逻辑层)
- C#图像处理:在图片上写字,文字位置居中问题
- 备考网规第一章非网络基础
- LeetCode报错:Line 923: Char 9: runtime error: reference binding to null pointer of type ‘std::__cxx11:
- 对话京东安全首席架构师:电商平台构建安全防护体系关键点
- R12 AR INVOICE 接口表导入