循环不间断向上滚动的文本特效代码-文本文字特效
- 格式:doc
- 大小:26.00 KB
- 文档页数:3
文字的滚动特效代码文字的滚动特效代码文章来源:倾颜戏羽文本编辑:倾颜戏羽日志标签:博客教程 <MARQUEE>普通卷动<MARQUEE>向右滚动特效代码:<MARQUEEdirection=right>向右滚动</MARQUEE><MARQUEE behavior=alternate>来回卷动</MARQUEE>向上滚动特效代码:<MARQUEE direction=up>向上卷动</MARQUEE>向下滚动特效代码:<MARQUEE direction=down>向下卷动</MARQUEE>预设滚动次数特效代码:(loop=2 表示设定滚动两次就停,参数可以随意设定)<MARQUEE loop=2>预设滚动次数</MARQUEE>设定滚动宽度特效代码:(width=200表示设定滚动宽度参数为200,宽度参数可以自己设定)<MARQUEE width=200>设定滚动宽度</MARQUEE>设定滚动高度特效代码:(height=30 表示设定滚动高度参数为30,高度参数可以自己设定)<MARQUEE height=30>设定滚动高度</MARQUEE>设定滚动背景颜色特效代码:(bgColor=#003366表示设定滚动背景颜色颜色码:003366)<MARQUEE bgColor=#003366>设定滚动背景颜色</MARQUEE>设定滚动速度特效代码:(scrollAmount=38参数越大滚动速度越快)<MARQUEE scrollAmount=38>设定滚动速度</MARQUEE>设定滚动延迟时间特效代码:(scrollDelay=300 参数越大延迟时间越久)<MARQUEE scrollDelay=300>设定滚动延迟时间</MARQUEE>滚动链接特效代码:(“链接地址”表示此处粘贴要链接的网站地址、“链接名称”表示此处填写链接的对象名称)<MARQUEE scrollAmount=2 width=200 height=30><A href="链接地址" target=_blank>链接名称</A></MARQUEE>各参数详解:看右边=》1).scrollAmount。
HTML代码大全一、从右向左移代码<marquee direction=left>需要移动的文字</marquee>二、从左向右移代码<marquee direction=right>需要移动的文字</marquee>三、一圈一圈绕着移动代码<marquee behavior=scroll>需要移动的文字</marquee>四、只移动三次就停了代码<marquee loop=3 behavior=slide>需要移动的文字</marquee>五、移一步,停一停代码<marquee scrolldelay=500 scrollamount=100>需要移动的文字</marquee>六、左右来回移动代码<marquee behavior=alternate>需要移动的文字</marquee>七、忽隐忽现移动代码<marquee behavior="alternate"><marquee width="150" direction=right>需要移动的文字</marquee>八、从下向上移动代码<marquee direction=up><div align="center">需要移动的文字</div></marquee>九、从上向下移动代码<marquee direction=down><div align="center">需要移动的文字</div></marquee>十、垂直往复移动代码<marquee direction=up behavior=alternate><div align="center">需要移动的文字</font></div></marquee>十一、从左上向右下移动代码<marquee direction=right><marquee width=216 direction=down>需要移动的文字</marquee>十二、从右上向左下移动代码<marquee direction=left><marquee direction=down>需要移动的文字</marquee>十三、从左下向右上移动代码<marquee direction=right><marquee direction=up>需要移动的文字</marquee>十四、从右下向左上移动代码<marquee direction=left><marquee direction=up>需要移动的文字</marquee>十五、水平相反移动代码<p align=center> <marquee width="216px">需要移动的文字</marquee><marquee width="216px" direction=right>需要移动的文字</marquee></p>十六、左右两边向中间移动代码<p align=center><marquee style="width:216px;" direction=right>需要移动的文字</marquee><marquee style="width:216px;"direction=left>需要移动的文字</marquee></p>十七、左右两边向中间来回移动代码<MARQUEE scrollAmount=3 behavior=alternate width="40%">左右向中间来回移动</MARQUEE><MARQUEE scrollAmount=3 direction=rightbehavior=alternate width="40%">动移回来间中向右左</MARQUEE>十八、从上下向中间移动代码<p></p><center><marquee width=288 direction=down scrollAmount=2height=50><center>需要移动的文字</center></marquee><center><marquee width=288 direction=up scrollAmount=2 height=50><center>需要移动的文字</center></marquee></center></center><p></p>十九、从中间向上下移动代码<p></p><center><marquee width=288 direction=up scrollAmount=2height=50><center>需要移动的文字</center></marquee><center><marquee width=288 direction=down scrollAmount=2 height=50><center>需要移动的文字</center></marquee></center></center><p> </p></marquee>二十、上下向中间来回移动代码<MARQUEE scrollAmount=1 direction=down behavior=alternateheight=50><DIV align=center>上下向中间来回移动</DIV></MARQUEE><MARQUEE scrollAmount=1 direction=up behavior=alternate height=50><DIV align=center>上下向中间来回移动</DIV></MARQUEE>二十一、上下交替移动代码<marquee direction=up behavior=alternate width=45 height=160><center>需</center></marquee><marquee direction=upbehavior=alternate width=45><center>要</center></marquee><marqueedirection=up behavior=alternate width=45height=160><center>移</center></marquee><marquee direction=upbehavior=alternate width=45><center>动</center></marquee><marquee direction=up behavior=alternate width=45 height=160><center>的</center></marquee><marqueedirection=up behavior=alternate width=45><center>文</center></marquee></marquee><marquee direction=up behavior=alternate width=45 height=160><center>字</center></marquee>二十二、移动后消失代码<marquee style="width: 288px; height: 120px" scrollAmount=5direction=up><center><div><marquee direction=upbehavior=alternate width=30 height=100><center>需</center></marquee><marquee direction=up behavior=alternate width=30 height=110><center>移</center></marquee><marquee direction=up behavior=alternate width=30 height=100><center>要</center></marquee><marquee direction=up behavior=alternate width=30 height=110><center>动</center></marquee><marquee direction=up behavior=alternate width=30 height=100><center>的</center></marquee><marquee direction=up behavior=alternatewidth=30 height=110><center>字</center></marquee><marqueedirection=up behavior=alternate width=30 height=100><center>文</center></marquee></div></center></marquee>二十三、波浪式移动代码<div align=center><marquee width=288filter: wave(add=0,lightstrength=50,strength=3,freq=2, phrase=10); scrollAmount=5 direction=up behavior=alternate><div align=center><marquee scrollAmount=3 behavior=altrnatewidth=216><div align=center>需要移动的文字</div></marquee></div></marquee></div>二十四、往复波浪式移动代码<marquee width=288 filter:wave(add=0,lightstrength=50,strength=3,freq=2,phrase=10); scrollAmount=5direction=upbehavior=alternate><marquee scrollAmount=3 behavior=alternate width=288>需要移动的文字</marquee></marquee>二十五、交替往复波浪式移动代码<marquee width=436 scrollAmount=5 direction=right behavior=alternate><marquee direction=up behavior=alternate width=50 height=200 align="middle">需</marquee><marquee direction=upbehavior=alternate width=50 height=150>的</marquee><marquee direction=up behavior=alternate width=50 height=200>要</marquee><marquee direction=up behavior=alternate width=50 height=150> 文</marquee><marquee direction=up behavior=alternate width=50height=200>移</marquee><marquee direction=up behavior=alternate width=50 height=150>字</marquee><marquee direction=upbehavior=alternate width=50 height=200>动</marquee></marquee>二十六、S型移动代码<marquee behavior=alternate direction=up scrollamount=2 scrolldelay=65height=120 style="Text-align;filter:wave(add=0,phase=1, freq=1,strength=50,color=.ffffff)"><center>需要移动的文字</center></marquee>二十七、多层多式复合移动代码<table bgcolor="#ffffff"> <tr><td width="1" valign="top" > <marquee direction="down" behavior="alternate" scrollamount=1height="120"> <marquee direction="right" scrollamount=4 behavior="alternate" width="288">需要移动的文字</marquee> </marquee> </td> <td width="288"> <marquee behavior=alternate direction=up scrollamount=2 scrolldelay=65 height="120" width="288"style="Text-align;filter:wave(add=1,phase=4, freq=1,strength=50)"><center>需要移动的文字</center></marquee></td></tr></table>二十八、文字竖排渐出移动代码<div align=center><marquee scrollAmount=1 scrollDelay=100 behavior=slide loop=1 width=290 height=180><marquee style="line- height: 120%; writing-mode: tb-rl" scrollAmount=1 scrollDelay=100direction=up width=290 height=180><p align=center>需要移动的字文<br>.<br>.<br>.<br>需<br>要<br>移<br>动<br>的<br>文<br>字<br>.<br>.<br>.</p></marquee></marquee></div>二十九、文字穿梭移动代码<marquee scrollAmount=2 width=30 height=20>文文</marquee> <marqueescrollAmount=2 width=30 height=20>字字</marquee> <marqueescrollAmount=2width=30 height=20>穿穿</marquee> <marquee scrollAmount=2width=30 height=20>梭梭</marquee>附注各主要参数的含义:align:是设定活动对象(图片或文字)的位置。
滚动文字的操作方法滚动文字通常是通过在网页中使用CSS或JavaScript来实现的。
下面是一些常见的滚动文字的操作方法:1. 使用CSS的marquee属性:在CSS中,可以使用marquee属性来创建滚动文字。
例如,可以在需要滚动文字的HTML元素中添加以下CSS样式:<style>.scrolling-text {width: 300px;height: 100px;overflow: hidden;}.scrolling-text p {white-space: nowrap;animation: marquee 5s linear infinite;}@keyframes marquee {0% { transform: translateX(100%); }100% { transform: translateX(-100%); }}</style><div class="scrolling-text"><p>This is a scrolling text.</p></div>此样式会创建一个宽度为300px,高度为100px的容器,并使其中的文字以5秒的速度从右向左滚动。
2. 使用JavaScript脚本:另一种方法是使用JavaScript来创建滚动文字。
例如,可以在需要滚动文字的HTML元素中添加以下JavaScript脚本:<script>function scrollText() {var container = document.getElementById("scrolling-text");var text = container.innerHTML;container.innerHTML = "<marquee>" + text + "</marquee>";}scrollText();</script><div id="scrolling-text">This is a scrolling text.</div>此脚本会将指定的文本包装在`<marquee>`标签中,从而实现滚动效果。
【网页特效代码-文字特效】按设定时间滚动的文本信息.txt爱情就像脚上的鞋,只有失去的时候才知道赤脚走路是什么滋味骗人有风险,说慌要谨慎。
不要爱上年纪小的男人,他会把你当成爱情学校,一旦学徒圆满,便会义无反顾地离开你。
<html><title>按一定时间向上滚动的文本信息!Q291911320</title><style type="text/css"><!--/*顶部滚动秀*/#scrolllayer{float:left;overflow:hidden;height:18px;background:#E0E0E0;padding:0px;width:180 px; margin-top:3px;}#scrollmessage{float:left;text-align:left;width:180px;font-size:12px;font-family: "宋体";}#scrollmessage ul {list-style:none; padding:0; margin:0;}#scrollmessage li {line-height:18px;color:#FF0000;}#scrollmessage li a{color:#FF0000; text-decoration:none;}--></style></head><body><div id="scrolllayer"><div id="scrollmessage"><ul><li><a href="" target="_blank" title="[上海电影节] 跟女明星学扮靓之道">上海电影节女明星</a></li><li><a href="" target="_blank" title="20款简约北欧风格经典样板房">20款简约北欧风格经典样板房</a></li><li><a href="" target="_blank" title="天生明星脸的天使们">天生明星脸的天使们!</a></li><li><a href="" target="_blank" title="多吃四种食物防晒更高效">多吃四种食物防晒更高效</a></li><li><a href="" target="_blank" title="该给妆容换夏装啦!">脸蛋也要换“夏妆”</a></li></ul></div></div><script type="text/javascript" language="javascript"><!--//以下参数请勿修改try{var marqueesHeight = 18; //高度var stopscroll = false;var scrollElem = document.getElementById("scrolllayer");with(scrollElem){style.width = 180;//宽度style.height = marqueesHeight;style.overflow = 'hidden';noWrap = true;}scrollElem.onmouseover = new Function('stopscroll = true'); scrollElem.onmouseout = new Function('stopscroll = false'); var preTop = 0;var currentTop = 0;var stoptime = 0;var leftElem = document.getElementById("scrollmessage"); scrollElem.appendChild(leftElem.cloneNode(true));init_srolltext();}catch(e) {}function init_srolltext(){scrollElem.scrollTop = 0;setInterval('scrollUp()', 15); //滚动速度}function scrollUp(){if(stopscroll) return;currentTop += 1;if(currentTop == 19) { //滚动距离stoptime += 1;currentTop -= 1;if(stoptime == 220) { //停顿时间currentTop = 0;stoptime = 0;}}else{preTop = scrollElem.scrollTop;scrollElem.scrollTop += 1;if(preTop == scrollElem.scrollTop){scrollElem.scrollTop = 0;scrollElem.scrollTop += 1;}}}//--></script></body></html>。
文字段落向上无缝滚动特效<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><style type="text/css"><!--#nli_con {height: 200px;width: 400px;overflow: hidden;border: 1px solid #999999;}div,dl,dt,dd {margin: 0px;padding: 0px;}dl {padding-top: 5px;padding-bottom: 5px;border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #CCCCCC;font-size: 14px;margin-right: 10px;margin-left: 10px;}dd {font-size: 12px;}--></style><script language="javascript">var $ = function (d){typeof d == "string" &&(d = document.getElementById(d));return $.fn.call(d);};$.fn = function (){//附加2个方法this.$ADD = function (fn){CLS.add(this,fn)};this.addEvent = function (sEventType,fnHandler){if (this.addEventListener) {this.addEventListener(sEventType, fnHandler, false);}else if (this.attachEvent) {this.attachEvent("on" + sEventType, fnHandler);}else {this["on" + sEventType] = fnHandler;}}this.removeEvent = function (sEventType,fnHandler){if (this.removeEventListener) {this.removeEventListener(sEventType, fnHandler, false);} else if (this.detachEvent) {this.detachEvent("on" + sEventType, fnHandler);}else { this["on" + sEventType] = null;}}return this;var Class = {create: function() {return function() { this.initialize.apply(this, arguments); }}};var Bind = function (obj,fun,arr){return function() {return fun.apply(obj,arr);}}var Marquee = Class.create();Marquee.prototype = {initialize: function(id,name,out,speed) { = name;this.box = $(id);this.out = out;this.speed = speed;this.d = 1;this.box.style.position = "relative";this.box.scrollT op = 0;var _li = this.box.firstChild;while(typeof(_li.tagName)=="undefined")_li = _li.nextSibling;this.lis = this.box.getElementsByTagName(_li.tagName);this.len = this.lis.length;for(var i=0;i<this.lis.length;i++){//计算该复制多少节点,保证无缝滚动,没必要的就不复制var __li = document.createElement(_li.tagName);__li.innerHTML = this.lis[i].innerHTML;this.box.appendChild(__li);if(this.lis[i].offsetTop>=this.box.offsetHeight)break;}this.Start();this.box.addEvent("mouseover",Bind(this,function(){clearTim eout(this.timeout);},[]));this.box.addEvent("mouseout",Bind(this,this.Start,[]));Start:function (){clearTimeout(this.timeout);this.timeout = setTimeout(+".Up()",this.out*1000) },Up:function(){clearInterval(this.interval);this.interval = setInterval(+".Fun()",10);},Fun:function (){this.box.scrollT op+=this.speed;if(this.lis[this.d].offsetTop <= this.box.scrollTop){clearInterval(this.interval);this.box.scrollT op = this.lis[this.d].offsetTop;this.Start();this.d++;}if(this.d >= this.len + 1){this.d = 1;this.box.scrollT op = 0;}}};$(window).addEvent("load",function (){marquee = new Marquee("nli_con","marquee",1,2);//加载完后运行代码,});</script></head><body><div id="nli_con"><dl><dt><a href=/a/200905/ajax_erp.html' target='_blank'><strong>1. Ajax不只是炫技</strong></a></dt> <dd>Ajax不只是创造炫丽效果的网页技术,企业也能用来改善ERP系统的操作效率与使用性,Ajax看似容易,其实背后需要网站开发与内容建置的整体配套,能够评估Ajax的最佳使用,才...[阅读全文]</dd></dl><dl><dt><a href='/a/200905/Ajax_Calendar.html' target='_blank'><strong>2. Ajax Calendar的另类用法</strong></a></dt><dd>登录界面是信息系统提供的必备的功能,是提供给用户提供维护信息的接口。
上下左右滚动文字代码上下左右滚动文字代码下左右滚动文字代码字滚动代码1、来回滚动(marquee behavior=" alternate ")(font color=red)文字来回滚动(/marquee )实际效果:文字来回滚动~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />2、向一边滚动(marquee)(font color=#颜色代码)文字向一边滚动(/marquee )实际效果:文字向一边滚动~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~3、走走停停(marquee scrolldelay=500 scrollamount=100)文字走走停停(/marquee)实际效果:文字走走停停~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4、只走几趟(以3趟为例)(marquee loop=3 width=50% behavior=scroll )文字只走3趟(/marquee)实际效果:文字只走3趟~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5、选定滚动方向(marquee direction=left )文字自右向左移(/marquee)实际效果:文字自右向左移~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(marquee direction=right )文字自左向右移(/marquee)实际效果:文字自左向右移~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<marquee scrollamount=8>文字很快滚。
</marquee>文字很快滚。
连续向上滚动代码(不间断连续滚动)<script language="javascript">var speed=100;//速度数值越⼤速度越慢var mbox2=document.getElementById("mbox2");var mbox1=document.getElementById("mbox1");var mbox=document.getElementById("mbox");mbox2.innerHTML=mbox1.innerHTML;var fx=0;var icount=1;var MyMar4function setFx(vle){fx=vle;icount=1MyMar4=setInterval(Marquee,speed);//alert(vle);}function Marquee(){if(fx==0){Marquee3();}else{Marquee4();}}function Marquee3(){if(mbox2.offsetWidth-mbox.scrollTop<=0)//offsetWidth 是对象的可见宽度mbox.scrollTop-=mbox1.offsetWidth//scrollWidth 是对象的实际内容的宽,不包边线宽度else{mbox.scrollTop++;}}function Marquee4(){if(mbox.scrollTop>=0)mbox.scrollTop--;}var MyMar4=setInterval(Marquee,speed);mbox.onmouseover=function() {clearInterval(MyMar4)};mbox.onmouseout=function() {MyMar4=setInterval(Marquee,speed)};</script>⽹页中引⽤<div id="mbox" style="overflow:hidden;height:210px;"><div id="mbox1">XXXXXX(要滚动的内容代码)<div id="mbox2"></div></div><script language="javascript">...........</script>。
HTML滚动文字代码marquee标签标签:marquee标签实用代码html滚动字幕杂谈<marquee style="WIDTH: 388px; HEIGHT: 200px" scrollamount="2" direction="up" ><div align="left" ><br /></div ><center ><font face="黑体" color="#008000" size="4" ></font ></center ><div align="left" ><br /></div ><center ><p ><font color="#ff6600" size="4" >滚动文字</font ></p > <p ><font color="#ff4500" size="4" >滚动文字</font ></p > <p ><font color="#ff3300" size="4" >滚动文字</font ><br /><br /></p ></marquee >marquee 参数:BGColor:滚动文本框的背景颜色。
Direction:滚动方向设置,可选择Left(从右到左)、Rightup (从下到上)和down(从上到下)scrolldelay:每轮滚动之间的延迟时间,数字越大滚动越慢。
简单代码实现文字抖动、滚动效果先看预览效果:操作时间:拿一个涉及到参数最多的效果,上下抖动来做讲解吧:首先,打开软件,点击最最上角的【文件】--->【新建】。
打开新建界设置页面。
选择常规-->基本页-->HTML-->创建。
创建后如图:对软件不做讲解,只讲解抖动效果的操作。
如有其他问题请留言或联系我。
1、在空白的地方,也就是光标的地方随意输入文字2、选中输入的文字3、在软件最上面一行菜单栏。
选择怕【插入】-->【标签】-->打开【标签选择器】-->依次选择【标记语言标签】-->【HTML标签】-->【页元素】-->【marquee】-->完成插入标签操作。
标签选择器。
如图:至此操作已经完成,可先按F12预览默认效果。
默认效果从右侧滚动至左侧。
速度适中。
预览完成下,然后来看对参数进行设置1、软件有三种编辑模式,【代码】【拆分】【设计】,默认为设计模式。
其他模式可以自己切换来看看是什么效果。
我们切换到代码模式。
可以看到我们输入的文字和marquee标签(这里说明一下,html中的标签全部是成对儿出现的,例如图中的<marquee>滚动文字输入</marquee>,差别在于标签开始是<marquee>,结束是</marquee>。
在开始于结束中间则是滚动文字的内容)。
2、切换到代码页面之后,把光标移动到<marquee>字母之间。
然后看软件的右侧,会有一个【标签查看器】的相关参数设置图如果没有出现,点击键盘F9即可。
如图:右侧即为各个参数的设置。
参数的说明可以对照前面的参数说明表。
3、下面来说对于上下抖动文字的参数设置,如图示左侧为参数名,右侧为参数值。
有的参数有预设值供你选择,有的参数没有预设值,需要自己输入。
此参数为上限抖动参数不同效果的参数请参照上效果预览参数。
滚动参数设置解析:behavior:此参数设置为alternate /意思是说在滚动区域范围内,滚动文字碰到滚动区域边界之后来回滚动,假设文字长度为50像素,那么滚动区域设置为60像素。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>jQuery插件-文字滚动</title><script type="text/javascript" src="/tool/css3Preview/jquery-1.4.2.min.js"></script><script type="text/javascript" src="jQuery.textSlider.js"></script><style type="text/css">ul,li{margin:0;padding:0}#scrollDiv{ overflow:auto}.scrollText{width:300px;height:100px;min-height:25px;line-height:25px;border:#ccc 1px solid; float:left;overflow:hidden}.scrollText li{height:25px;padding-left:10px;}.up{ margin-left:310px; width:50px; height:50px; background:#F90}.down{ margin:0 0 0 310px; zoom:1; width:50px; height:50px; background:#960}</style></head><body><p>一行滚动演示:</p><div id="scrollDiv"><div class="scrollText"><ul><li>这是公告标题的第一行</li><li>这是公告标题的第二行</li><li>这是公告标题的第三行</li><li>这是公告标题的第四行</li><li>这是公告标题的第五行</li><li>这是公告标题的第六行</li><li>这是公告标题的第七行</li><li>这是公告标题的第八行</li><li>这是公告标题的第9行</li><li>这是公告标题的第10行</li><li>这是公告标题的第11行</li><li>这是公告标题的第12行</li></ul></div></div><p>多行滚动演示:</p><div id="scrollDiv2"><div class="scrollText"><ul><li>这是公告标题的第一行</li><li>这是公告标题的第二行</li><li>这是公告标题的第三行</li><li>这是公告标题的第四行</li><li>这是公告标题的第五行</li><li>这是公告标题的第六行</li><li>这是公告标题的第七行</li><li>这是公告标题的第八行</li><li>这是公告标题的第9行</li><li>这是公告标题的第10行</li><li>这是公告标题的第11行</li><li>这是公告标题的第12行</li></ul></div></div><script type="text/javascript">$(document).ready(function(){$("#scrollDiv").textSlider({line:1,speed:500,timer:1000});$("#scrollDiv2").textSlider({line:2,speed:500,timer:1000});});</script></body></html>jQuery.textSlider.js插件内容:(function($){$.fn.textSlider = function(settings){settings = jQuery.extend({speed : "normal",line : 2,timer : 2000}, settings);return this.each(function() {$.fn.textSlider.scllor( $( this ), settings );});};$.fn.textSlider.scllor = function($this, settings){var ul = $("ul:eq(0)",$this );var timerID;var li = ul.children();var liHight=$(li[0]).height();var upHeight=0-settings.line*liHight;//滚动的高度;var scrollUp=function(){ul.animate({marginTop:upHeight},settings.speed,function(){for(i=0;i<settings.line;i++){ul.find("li:first",$this).appendTo(ul);}ul.css({marginTop:0});});};var autoPlay=function(){timerID = window.setInterval(scrollUp,settings.timer);};var autoStop = function(){window.clearInterval(timerID);};//事件绑定ul.hover(autoStop,autoPlay).mouseout();};})(jQuery);。