打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
滚动效果文字

<!DOCTYPE html>

<html>

<head>

<script>

function myFunction()

{

document.getElementById("demo").innerHTML="My First JavaScript Function";

}

</script>

</head>

<body>

<h1>My Web Page</h1>

<p id="demo">A Paragraph</p>

<button type="button" onclick="myFunction()">Try it</button>

<!--marquee 参数:

BGColor:滚动文本框的背景颜色。

Direction:滚动方向设置,可选择Left(从右到左)、Rightup(从下到上)和down(从上到下)

scrolldelay:每轮滚动之间的延迟时间,数字越大滚动越慢。

scrollamount:一次滚动总的时间量,数字越小滚动越慢。

Behaviour:滚动的方式设置,三种取值:Scroll(循环滚动) lide(滑入,单次滚动)、Alternate(来回滚动)。

Align:文字的对齐方式设置,可选择Middle(居中)、Bottom(居下)还是Top(居上)。

Width:滚动文本框的宽度,输入一个数值后从后面的单选框选择in Pixels(按像素)或是in Percent(按百分比)。

Height:滚动文本框的高度,输入一个数值后从后面的单选框选择in Pixels(按像素)或是in Percent(按百分比)。

loop:滚动次数,默认为infinite(无限)

hspace、vspace:前后、上下的空行-->

<marquee style="WIDTH: 100px; 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 >

<br />

</p >

</marquee >

<br /><marquee scrollAmount=2 width=200>欢迎来到魔人牛牛新浪博客!</marquee>

<!--a)给滚动字幕加超链接-->

<br /><marquee scrollAmount=2 width=300>

<a href=http://www.sina.com.cn/>新浪首页给滚动字幕加超链接</a>

</marquee>

<!--b)当鼠标停留在文字上,文字停止滚动-->

<br />

<br /><marquee scrollAmount=2 width=300 onmouseover=stop() onmouseout=start()>当鼠标停留在文字上,文字停止滚动!</marquee>

<!交替效果-->

<br />

<br /><marquee scrollAmount=2 width=99 behavior=alternate>交替效果来回滚动!</marquee>

<br />

<marquee scrollAmount=2 width=300 height=160 direction=up>·好!<br>·欢迎来到魔人牛牛新浪博客!<br>·这是一段多行文本向上滚动代码。<p>·<a href=http://www.sina.com.cn/>新浪首页</a></marquee>

<br />

 <!-- 

<script>document.write('<marquee scrollAmount=2 width=300 height=160 direction=up>·您好!<br>·欢迎来到魔人牛牛新浪博客!<br>·这是一段多行文本向上滚动代码。<p>·<a href=http://www.sina.com.cn/>新浪首页</a></marquee>')< /script>-->

<!--图片超链接-->

 <a href=http://www.sina.com.cn/><img src=D:\桌面文件\图片\center.jpg border=0></a>

<script>document.write('<marquee scrollAmount=2 width=340 height=160 direction=up onmouseover=stop() onmouseout=start()> <a href=http://www.baidu.com.cn/>

<img src=D:\桌面文件\新图片\NBJ9.jpg border=0></a> </marquee>')</script> 

</body>

</html>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
好听的店铺名字大全_淘宝店铺装修各类代码大全
动态文字特效代码
漂亮文字特效滚动代码
HTML语言的基本运用及代码
如何制作移动文字
文字移动实例+解释
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服