运用源代码,在HTML中编辑,具体情况如下:
一、滚动字幕[由右至左]
<marquee scrollamount="2"
scrolldelay="40" width="400" height="30">滚动文字</marquee>
二、滚动字幕[由左至右]
(一)
<marquee scrollamount="2" scrolldelay="40" width="400" height="0" direction="right">滚动文字</marquee>
(二)
1、复制它: <marquee direction="right">滚动文字</marquee>
2、将其中的文字换成你需要的文字三、滚动字幕[由下至上]
(一)<marquee scrollamount="2" scrolldelay="40" width="400" height="100" direction="up">滚动文字</marquee>
(二)
1、复制它: <marquee direction="up">滚动文字</marquee>
2、将其中的文字换成你需要的文字
四、滚动字幕[左右交替]
<marquee scrollamount="2" scrolldelay="40" width="400" height="0" behavior="alternate">滚动文字</marquee>
五、让文字左右来回流动
1、复制以下代码:
<marquee behavior="alternate">滚动文字</marquee>
2、将文字换成你需要的文字
注意:其中的数字是设置字幕的高度、宽度,均为像素。根据自己需要摸索调整。
参数一:direction
direction的英文意思就是方向。这个参数的取值有四个:left(左)、right(右)、up(上)、down(下)。
例:<marquee direction=up>向上移动</marquee>
参数二:behavior
移动方式。值:scroll(循环移动)、slide(只移动一个回合)、alternate(来回移动)。
例:<marquee direction=left behavior=alternate>哈哈,我来回走!</marquee>
<marquee direction=left behavior=slide>累!我只走一次!</marquee>
参数三:loop
循环。若未指定则循环不止(infinite),其值取数值。例:
<marquee loop=3>我只走三次哦</marquee>
参数四:scrollamount
移动速度。值取正整数。数值越大,速度越快。例:
<marquee scrollamount=25>看,我走多快!</marquee>
参数五:scrolldelay
延时。数值。例:
<marquee scrolldelay=1000>我走一走,停一停</marquee>
参数六:bgcolor
底色。例:<marquee bgcolor=pink>看到了吧?有底色!</marquee>
参数七:width和height
就是移动的宽度与高度了。例:
<marquee width=200 height=200 bgcolor=pink direction=down>这个面积不够我移动!</marquee>
其他参数:
空白(Margins)<hspace=数值 vspace=数值>
对齐方式(Align) <align=top/ middle/bottom>