《HTML教程》12章 会移动的文字(Marquee)
基本语法
<marquee> ... </marquee>
<marquee>啦啦啦,我会移动耶!</marquee>
文字移动属性的设置
方向 <direction=#> #=left, right
<marquee direction=left>啦啦啦,我从右向左移!</marquee>
<marquee direction=right>啦啦啦,我从左向右移!</marquee>
方式 <bihavior=#> #=scroll, slide, alternate
<marquee behavior=scroll>啦啦啦,我一圈一圈绕着走!</marquee>
<marquee behavior=slide>啦啦啦,我只走一次就歇了!</marquee>
<marquee behavior=alternate>啦啦啦,我来回走耶!</marquee>
循环 <loop=#> #=次数;若未指定则循环不止(infinite)
<marquee loop=3 behavior=scroll>啦啦啦,我只走 3 趟哟!</marquee>
<marquee loop=3 behavior=slide>啦啦啦,我只走 3 趟哟!</marquee>
<marquee loop=3 behavior=alternate>啦啦啦,我只走 3 趟哟!</marquee>
速度 <scrollamount=#>
<marquee scrollamount=20>啦啦啦,我走得好快哟!</marquee>
延时 <scrolldelay=#>
<marquee scrolldelay=500 scrollamount=100>啦啦啦,我走一步,停一停!</marquee>
外观(Layout)设置
滚动宽度(Align) <width=#>
<marquee width=200>啦啦啦,我200米赛跑耶!</marquee>
<marquee width=300>啦啦啦,我300米赛跑耶!</marquee>
<marquee width=400>啦啦啦,我400米赛跑耶!</marquee>
底色 <bgcolor=#>
<marquee bgcolor=#aaaaee>啦啦啦,我的跑道很醒目耶!</marquee>
高度 <height=#>
<marquee height=40>啦啦啦,我的跑道很宽敞耶!</marquee>
空白(Margins)<hspace=# vspace=#>
<marquee hspace=80 vspace=20>啦啦啦,我永远不到终点耶!</marquee>