求文字滚动JS代码 求文字滚动JS代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <marquee scrollamount="1" scrolldelay="80" direction="left">你要滚动的内容<marquee> 文字滚动是由<marquee></marquee>控制的。marquee的参数如下:1、方向 <direction=#> #=left, right如:<marquee direction=left>啦啦啦,我从右向左移!</marquee><marquee direction=right>啦啦啦,我从左向右移!</marquee>2、方式 <bihavior=#> #=scroll, slide, alternate如:<marquee behavior=scroll>啦啦啦,我一圈一圈绕着走!</marquee><marquee behavior=slide>啦啦啦,我只走一次就歇了!</marquee><marquee behavior=alternate>啦啦啦,我来回走耶!</marquee>3、循环 <loop=#> #=次数;若未指定则循环不止(infinite)如:<marquee loop=3 width=50% behavior=scroll>啦啦啦,我只走 3 趟哟!</marquee><marquee loop=3 width=50% behavior=slide>啦啦啦,我只走 3 趟哟!</marquee><marquee loop=3 width=50% behavior=alternate>啦啦啦,我只走 3 趟哟!</marquee>4、速度 <scrollamount=#>如:<marquee scrollamount=20>啦啦啦,我走得好快哟!</marquee>5、延时 <scrolldelay=#>如: <marquee scrolldelay=500 scrollamount=100>啦啦啦,我走一步,停一停!</marquee>6、对齐方式(Align) <align=#> #=top, middle, bottom如:<font size=6><marquee align=# width=400>啦啦啦,我会移动耶!</marquee></font>7、底色 <bgcolor=#>#=rrggbb 16 进制数码,或者是下列预定义色彩:Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,Fuchsia, White, Green, Purple, Silver, Yellow, Aqua如:<marquee bgcolor=aaaaee>啦啦啦,我会移动耶!</marquee>8、面积 <height=# width=#>如:<marquee height=40 width=50% bgcolor=aaeeaa> 啦啦啦,我会移动耶!</marquee>9、空白(Margins)<hspace=# vspace=#><marquee id="scrollarea" direction="up" scrolldelay="10" scrollamount="1" width="150" height="80" onmouseover="this.stop();" onmouseout="this.start();"> <SCRIPT>function MarqueeLinkBox(id, lh, speed, delay) { var o = document.getElementById(id); var p = false; var t; o.style.overflow = "hidden";o.style.height = o.style.lineHeight = lh + "px"; o.style.lineHeight = "18px"; o.style.height = o.style.lineHeight; o.onmouseover = function() { p = true; } o.onmouseout = function() { p = false;} function start() { t = setInterval(scrolling, speed); if (!p) {o.scrollTop++;} } function scrolling() { if ((o.scrollTop % lh) != 0) { o.scrollTop++; if (o.scrollTop >= o.scrollHeight - lh - 1) { o.scrollTop = 0; } } else { clearInterval(t); setTimeout(start, delay); } } setTimeout(start, delay);}</SCRIPT><div id="DD"> 1111111111111111111111111<br /> 1231222222222222222222222<br /> 1112323232323232323232111<br /></div><SCRIPT>MarqueeLinkBox("DD",18,10,2000);</SCRIPT> marquee 这个只对IE有效吧。 没有依据的话不要说出来IE8,chrome2.0 ,firefox3.5,opera9.64,safari4.0.3下测试通过 <marquee scrollamount="1" scrolldelay="80" onmouseover="this.stop()" onmouseout="this.start()" direction="left">你要滚动的内容 <marquee> 这有一个通用不间断滚动JS封装类,各式各样的文字滚动,图片滚动效果都有,挺全面的。http://www.abaonet.com/demo/codeR/d1816/MSClass.html web 文本编辑器 word 图片 自动上传 JDBC访问MySql数据库实例 如何用javascript抓取数据 现在禁用javascript的浏览器的用户多吗? 页面加载时让所有分类名称隐藏,点击分类名称时让产品显示,其他的全部隐藏 如何实现模式对话框的分页显示 有没有办法在选定图片文件后,不刷新就立刻显示在页面上? 如何使弹出的浏览器禁止使用标题栏上的“×”按钮? 如果在登陆的时候不让浏览器将登陆名和口令记下来 JS调用URL页面转向,控制器方法,点击按钮后报错 获取div是style属性值 JavaScript 日期转化
如:<marquee direction=left>啦啦啦,我从右向左移!</marquee>
<marquee direction=right>啦啦啦,我从左向右移!</marquee>2、方式 <bihavior=#> #=scroll, slide, alternate
如:<marquee behavior=scroll>啦啦啦,我一圈一圈绕着走!</marquee>
<marquee behavior=slide>啦啦啦,我只走一次就歇了!</marquee>
<marquee behavior=alternate>啦啦啦,我来回走耶!</marquee>3、循环 <loop=#> #=次数;若未指定则循环不止(infinite)
如:<marquee loop=3 width=50% behavior=scroll>啦啦啦,我只走 3 趟哟!</marquee>
<marquee loop=3 width=50% behavior=slide>啦啦啦,我只走 3 趟哟!</marquee>
<marquee loop=3 width=50% behavior=alternate>啦啦啦,我只走 3 趟哟!</marquee>4、速度 <scrollamount=#>
如:<marquee scrollamount=20>啦啦啦,我走得好快哟!</marquee>5、延时 <scrolldelay=#>
如: <marquee scrolldelay=500 scrollamount=100>啦啦啦,我走一步,停一停!</marquee>6、对齐方式(Align) <align=#> #=top, middle, bottom
如:<font size=6>
<marquee align=# width=400>啦啦啦,我会移动耶!</marquee>
</font>
7、底色 <bgcolor=#>
#=rrggbb 16 进制数码,或者是下列预定义色彩:
Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime,
Fuchsia, White, Green, Purple, Silver, Yellow, Aqua如:<marquee bgcolor=aaaaee>啦啦啦,我会移动耶!</marquee>8、面积 <height=# width=#>
如:<marquee height=40 width=50% bgcolor=aaeeaa> 啦啦啦,我会移动耶!</marquee>9、空白(Margins)<hspace=# vspace=#><marquee id="scrollarea" direction="up" scrolldelay="10" scrollamount="1" width="150" height="80" onmouseover="this.stop();" onmouseout="this.start();">
<SCRIPT>
function MarqueeLinkBox(id, lh, speed, delay) {
var o = document.getElementById(id);
var p = false;
var t;
o.style.overflow = "hidden";
o.style.height = o.style.lineHeight = lh + "px";
o.style.lineHeight = "18px";
o.style.height = o.style.lineHeight;
o.onmouseover = function() { p = true; }
o.onmouseout = function() { p = false;}
function start() {
t = setInterval(scrolling, speed);
if (!p) {o.scrollTop++;}
}
function scrolling() {
if ((o.scrollTop % lh) != 0) {
o.scrollTop++;
if (o.scrollTop >= o.scrollHeight - lh - 1)
{
o.scrollTop = 0;
}
} else {
clearInterval(t);
setTimeout(start, delay);
}
}
setTimeout(start, delay);
}
</SCRIPT>
<div id="DD">
1111111111111111111111111<br />
1231222222222222222222222<br />
1112323232323232323232111<br />
</div>
<SCRIPT>MarqueeLinkBox("DD",18,10,2000);</SCRIPT>
http://www.abaonet.com/demo/codeR/d1816/MSClass.html