




已阅读5页,还剩16页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Jquery的文字滚动跑马灯插件(一个页面多个滚动区)兼容各浏览器的文本行高 复制代码 代码如下:(function($) $.fn.extend( RollTitle: function(opt,callback) if(!opt) var opt=; var _this = this; _this.timer = null; _this.lineH = _this.find(li:first).height(); _this.line=opt.line?parseInt(opt.line,15):parseInt(_this.height()/_this.lineH,10); _this.speed=opt.speed?parseInt(opt.speed,10):3000, /卷动速度,数值越大,速度越慢(毫秒 _this.timespan=opt.timespan?parseInt(opt.timespan,13):5000; /滚动的时间间隔(毫秒 if(_this.line=0) this.line=1; _this.upHeight=0-_this.line*_this.lineH; _this.scrollUp=function() _this.animate( marginTop:_this.upHeight ,_this.speed,function() for(i=1;i=_this.line;i+) _this.find(li:first).appendTo(_this); _this.css(marginTop:0); ); _this.hover(function() clearInterval(_this.timer); ,function() _this.timer=setInterval(function()_this.scrollUp();,_this.timespan); ).mouseout(); ) )(jQuery); 调用方法: line:一次卷动的文本行数 speed:卷动动画的时间 timespan:间隔时间 复制代码 代码如下: 文字1 文字2 文字3 文字4 文字5 $(document.body).ready(function() $(#RunTopic).RollTitle(line:1,speed:200,timespan:1500); ); 详细出处参考:/article/24369.htm文字轮流滚动,jquery帮忙 文字轮流滚动,jquery帮忙,走走停停,一次滚动一行,类似会停顿的走马灯,但又不完全是,代码里使用了克隆,不用克隆的话,remove()就没了。 文字轮流滚动,jquery帮忙 function scroll_news()$(function() $(#dvmq li).eq(0).fadeOut(slow,function() / alert($(this).clone().html(); /克隆:不用克隆的话,remove()就没了。 $(this).clone().appendTo($(this).parent().fadeIn(slow); $(this).remove(); ); );setInterval(scroll_news(),1000); 1,one 2,two 3,three 4,我走一步,停一停! JS一行多列文字循环滚动带停顿 这个代码很有用哦,可以自动把一个LI列表分为一行三列循环不间断滚动,中间有时间间隔,也就是停顿,有不少网站都在用这款代码哦,这就是从网上直接扒下来的,确实很不错。 多列文字循环滚动ul padding-right: 0px;padding-left: 0px;padding-bottom: 0px;margin: 0px;padding-top: 0px#announcement width:100%;overflow: hidden;#announcement div border: #e6e6e6 1px solid;padding:0px 10px 0px 10px;overflow-y:hidden;line-height: 24px;height: 24px#announcement li font-size: 12px;float: left;list-style-type: none;margin-right: 20px;padding-left: 10px;white-space: nowrap#announcement a text-decoration: none;#announcement a:hover text-decoration:underline; jQuery 类似腾讯网的图片幻灯特效(可自动播放)VB版增强型Windows任务管理器JQuery Tip多风格链接提示框VC+动态加载、调用smtp.dll发邮件示例VC+连连看游戏源码附外挂基于API的VB HOOK钩子拦截程序VB 操作系统的一些常用小技巧集xTree 标准的WEB菜单树(树形菜单) function $(id) return document.getElementById(id);var anndelay = 3000;var anncount = 0;var annheight = 24;var annst = 0;function announcementScroll() if( ! annst) $(announcementbody).innerHTML += + $(announcementbody).innerHTML; $(announcementbody).scrollTop = 0; if($(announcementbody).scrollHeight annheight * 3) annst = setTimeout(announcementScroll(), anndelay); else $(announcement).onmouseover = $(announcement).onmouseout = null; return; if(anncount = annheight) if($(announcementbody).scrollHeight - annheight = $(announcementbody).scrollTop) $(announcementbody).scrollTop = $(announcementbody).scrollHeight / 2 - annheight; anncount = 0; annst = setTimeout(announcementScroll(), anndelay); else $(announcementbody).scrollTop + ; anncount + ; annst = setTimeout(announcementScroll(), 10); announcementScroll();网站公告Js滚动代码 一段文字的滚动效果,常见于网站公告,鼠标放上停止滚动。 网站公告滚动 Tomat6.0的配置视频教程,AVI电影格式,相当清淅了,比起图文版的教程更贴切,不会配置Tomcat的网友,你可不要错过哦,由于视频抓图挺麻烦的,试了多次还是抓了一个不太清淅的,大家将就吧。 很牛的字幕滚动效果 很牛的字幕滚动特效,类似TAB选项卡一样,如果选项卡内的内容超过边界,可以点击下边的向上或向下按钮,控件文字上下滚动,黑色的界面看上去更酷了一些。 很牛的滚动字幕效果 function DynLayer(id,nestref,frame) if (!is.ns5 & !DynLayer.set & !frame) DynLayerInit()this.frame = frame | selfif (is.ns) if (is.ns4) if (!frame) if (!nestref) var nestref = DynLayer.nestRefArrayidif (!DynLayerTest(id,nestref) returnthis.css = (nestref)? eval(document.+nestref+.document.+id) : document.layersidelse this.css = (nestref)? eval(frame.document.+nestref+.document.+id) : frame.document.layersidthis.elm = this.event = this.cssthis.doc = this.css.documentelse if (is.ns5) this.elm = document.getElementById(id)this.css = this.elm.stylethis.doc = documentthis.x = this.css.leftthis.y = this.css.topthis.w = this.css.clip.widththis.h = this.css.clip.heightelse if (is.ie) this.elm = this.event = this.frame.document.allidthis.css = this.frame.document.allid.stylethis.doc = documentthis.x = this.elm.offsetLeftthis.y = this.elm.offsetTopthis.w = (is.ie4)? this.css.pixelWidth : this.elm.offsetWidththis.h = (is.ie4)? this.css.pixelHeight : this.elm.offsetHeightthis.id = idthis.nestref = nestrefthis.obj = id + DynLayereval(this.obj + =this)function DynLayerMoveTo(x,y) if (x!=null) this.x = xif (is.ns) this.css.left = this.xelse this.css.pixelLeft = this.xif (y!=null) this.y = yif (is.ns) this.css.top = this.yelse this.css.pixelTop = this.yfunction DynLayerMoveBy(x,y) this.moveTo(this.x+x,this.y+y)function DynLayerShow() this.css.visibility = (is.ns4)? show : visiblefunction DynLayerHide() this.css.visibility = (is.ns4)? hide : hiddenDynLtotype.moveTo = DynLayerMoveToDynLtotype.moveBy = DynLayerMoveByDynLtotype.show = DynLayerShowDynLtotype.hide = DynLayerHideDynLayerTest = new Function(return true)function DynLayerInit(nestref) if (!DynLayer.set) DynLayer.set = trueif (is.ns) if (nestref) ref = eval(document.+nestref+.document)else nestref = ; ref = document;for (var i=0; i 0) eval(divname.substr(0,index)+ = new DynLayer(+divname+,+nestref+)if (ref.layersi.document.layers.length 0) DynLayer.refArrayDynLayer.refArray.length = (nestref=)? : nestref+.document.+if (DynLayer.refArray.i DynLayer.refArray.length) DynLayerInit(DynLayer.refArrayDynLayer.refArray.i+)else if (is.ie) for (var i=0; i 0) eval(divname.substr(0,index)+ = new DynLayer(+divname+)return trueDynLayer.nestRefArray = new Array()DynLayer.refArray = new Array()DynLayer.refArray.i = 0DynLayer.set = falsefunction DynLayerSlideTo(endx,endy,inc,speed,fn) if (endx=null) endx = this.xif (endy=null) endy = this.yvar distx = endx-this.xvar disty = endy-this.ythis.slideStart(endx,endy,distx,disty,inc,speed,fn)function DynLayerSlideBy(distx,disty,inc,speed,fn) var endx = this.x + distxvar endy = this.y + distythis.slideStart(endx,endy,distx,disty,inc,speed,fn)function DynLayerSlideStart(endx,endy,distx,disty,inc,speed,fn) if (this.slideActive) returnif (!inc) inc = 10if (!speed) speed = 20var num = Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2)/incif (num=0) returnvar dx = distx/numvar dy = disty/numif (!fn) fn = nullthis.slideActive = truethis.slide(dx,dy,endx,endy,num,1,speed,fn)function DynLayerSlide(dx,dy,endx,endy,num,i,speed,fn) if (!this.slideActive) returnif (i+ =4)this.ns4 = (this.b=ns & this.v=4)this.ns5 = (this.b=ns & this.v=5)this.ie = (this.b=ie & this.v=4)this.ie4 = (this.version.indexOf(MSIE 4)0)this.ie5 = (this.version.indexOf(MSIE 5)0)this.min = (this.ns|this.ie)is = new BrowserCheck()function css(id,left,top,width,height,color,vis,z,other) if (id=START) return nelse if (id=END) return var str = (left!=null & top!=null)? #+id+ position:absolute; left:+left+px; top:+top+px; : #+id+ position:relative;if (arguments.length=4 & width!=null) str += width:+width+px;if (arguments.length=5 & height!=null) str += height:+height+px;if (arguments.length=6 & color!=null) str += (is.ns)? layer-background-color:+color+; : background-color:+color+;if (arguments.length=7 & vis!=null) str += visibility:+vis+;if (arguments.length=8 & z!=null) str += z-index:+z+;if (arguments.length=9 & other!=null) str += +otherstr += nreturn strfunction writeCSS(str,showAlert) str = css(START)+str+css(END)document.write(str)if (showAlert) alert(str)function MiniScroll(window,content) this.window = windowthis.content = contentthis.inc = 8this.speed = 20this.contentHeight = (is.ns)? this.content.doc.height : this.content.elm.scrollHeightthis.contentWidth = (is.ns)? this.content.doc.width : this.content.elm.scrollWidththis.up = MiniScrollUpthis.down = MiniScrollDownthis.left = MiniScrollLeftthis.right = MiniScrollRightthis.stop = MiniScrollStopthis.activate = MiniScrollActivatethis.activate(this.contentWidth,this.contentHeight)function MiniScrollActivate() this.offsetHeight = this.contentHeight-this.window.hthis.offsetWidth = this.contentWidth-this.window.wthis.enableVScroll = (this.offsetHeight0)this.enableHScroll = (this.offsetWidth0)function MiniScrollUp() if (this.enableVScroll) this.content.slideTo(null,0,this.inc,this.speed)function MiniScrollDown() if (this.enableVScroll) this.content.slideTo(null,-this.offsetHeight,this.inc,this.speed)function MiniScrollLeft() if (this.enableHScroll) this.content.slideTo(0,null,this.inc,this.speed)function MiniScrollRight() if (this.enableHScroll) this.content.slideTo(-this.offsetWidth,null,this.inc,this.speed)function MiniScrollStop() this.content.slideActive = false!-function init() pulloutContent = new Array()pulloutWindow = new Array()pulloutScroll = new Array()for (var i=0;iA FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: ArialA.scroll COLOR: #ffffffSTRONG FONT-WEIGHT: bold; FONT-SIZE: 15pt; LINE-HEIGHT: 25pt; FONT-FAMILY: ArialP FONT-SIZE: 10pt; LINE-HEIGHT: 13pt; FONT-FAMILY: Arial#pulloutInterface LEFT: 50px; WIDTH: 400px; CLIP: rect(0px 400px 250px 0px); POSITION: absolute; TOP: 50px; HEIGHT: 250px; BACKGROUND-COLOR: #000000; layer-background-color: #000000#pullout0Sidebar LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 5px; HEIGHT: 30px; BACKGROUND-COLOR: #dedede; layer-background-color: #DEDEDE#pullout1Sidebar LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 40px; HEIGHT: 30px; BACKGROUND-COLOR: #c5c5c5; layer-background-color: #C5C5C5#pullout2Sidebar LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 75px; HEIGHT: 30px; BACKGROUND-COLOR: #a2a2a2; layer-background-color: #A2A2A2#pullout3Sidebar LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 110px; HEIGHT: 30px; BACKGROUND-COLOR: #7e7e7e; layer-background-color: #7E7E7E#pullout4Sidebar LEFT: 5px; WIDTH: 100px; CLIP: rect(0px 100px 30px 0px); POSITION: absolute; TOP: 145px; HEIGHT: 30px; BACKGROUND-COLOR: #7e7e7e; layer-background-color: #7E7E7E#pulloutUpDown LEFT: 5px; POSITION: absolute; TOP: 200px#pulloutViewArea LEFT: 110px; WIDTH: 285px; CLIP: rect(0px 285px 240px 0px); POSITION: absolute; TOP: 5px; HEIGHT: 240px; BACKGROUND-COLOR: #000000; layer-background-color: #000000#pullout0Window LEFT: 0px; WIDTH: 285px; CLIP: rect(0px 285px 240px 0px); POSITION: absolute; TOP: 0px; HEIGHT: 240px; BACKGROUND-COLOR: #dedede; layer-b
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 抵押车买卖合同7篇
- 北京房屋个人装修合同2篇
- 合同协议-装饰公司设计合同2篇
- 新解读《GB-T 31095-2014地震情况下的电梯要求》
- 新解读《GB-T 31149-2014汽车物流服务评价指标》
- 新解读《GB-T 31209-2014绿色制造 低温冷风切削 技术要求》
- 工地吊篮销售合同范本
- 房屋代理租赁合同范本
- 商业用地出让合同范本
- 公伤补偿合同范本
- 教科版四年级上册科学全册教案
- 图形动画毕业设计
- 工会劳动竞赛课件
- 2025-2026学年苏教版小学数学五年级上册教学计划及进度表
- 2025年建筑工程-安全员C证-安全员(C证·上海)历年参考题库典型考点含答案解析
- 光伏项目施工组织设计方案
- 2025政府采购评审专家入库题库与答案
- 仪表安全知识培训课件
- 2025年三级老年人能力评估师考试题库(附答案)
- 婴幼儿营养与喂养理论知识考核试题及答案
- 工程设计图纸技术交底
评论
0/150
提交评论