《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>
啦啦啦,我只走 3 趟哟!
啦啦啦,我只走 3 趟哟!
啦啦啦,我只走 3 趟哟!
   速度 <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>
啦啦啦,我200米赛跑耶!
啦啦啦,我300米赛跑耶!我300米赛跑耶!我300米赛跑耶!
啦啦啦,我400米赛跑耶!我400米赛跑耶!我400米赛跑耶!我400米赛跑耶!
   底色 <bgcolor=#>
<marquee bgcolor=#aaaaee>啦啦啦,我的跑道很醒目耶!</marquee>
啦啦啦,我的跑道很醒目耶!
   高度 <height=#>
<marquee height=40>啦啦啦,我的跑道很宽敞耶!</marquee>
啦啦啦,我的跑道很宽敞耶!
   空白(Margins)<hspace=# vspace=#>
<marquee hspace=80 vspace=20>啦啦啦,我永远不到终点耶!</marquee>
啦啦啦,我永远不到终点耶!