html marquee标签使用示例介绍

2020-04-15 21:42:16易采站长站整理

<marquee bgcolor=”red”>设定活动字幕的背景颜色 bgcolor=”red”</marquee>

direction

设定活动字幕的滚动方向


<marquee direction=”down”>设定活动字幕的滚动方向direction=”down”:向下</marquee>
<marquee direction=”left”>设定活动字幕的滚动方向direction=”left”:向左</marquee>
<marquee direction=”right”>设定活动字幕的滚动方向direction=”right”:向右</marquee>
<marquee direction=”up”>设定活动字幕的滚动方向direction=”up”:向上</marquee>

height

设定活动字幕的高度


<marquee height=”500″ direction=”down” bgcolor=”#CCCCCC”>设定活动字幕的高度height=”500″</marquee>

width

设定活动字幕的宽度


<marquee width=”500″ bgcolor=”#CCCCCC”>设定活动字幕的宽度width=”500″</marquee>

hspace

设定活动字幕里所在的位置距离父容器水平边框的距离

This controls the horizontal(水平)space around the display box.


<table width=”500″ border=”1″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td><marquee hspace=”100″ bgcolor=”#CCCCCC”>hspace=”100″</marquee></td>
</tr>
</table>

vspace

设定活动字幕里所在的位置距离父容器垂直边框的距离

This controls the vertical(垂直) space around the display box.


<marquee vspace=”100″ bgcolor=”#CCCCCC”>hspace=”100″</marquee>

loop

设定滚动的次数,当loop=-1表示一直滚动下去,默认为-1


<marquee loop=”-1″ bgcolor=”#CCCCCC”>我会不停地走。</marquee>
<p>&nbsp;</p>
<marquee loop=”2″ bgcolor=”#CCCCCC”>我只走两次哦</marquee>

scrollamount

设定活动字幕的滚动速度,单位pixels


<marquee scrollamount=”10″ >scrollamount=”10″ </marquee>
<marquee scrollamount=”20″ >scrollamount=”20″ </marquee>
<marquee scrollamount=”30″ >scrollamount=”30″ </marquee>

scrolldelay

设定活动字幕滚动两次之间的延迟时间,单位millisecond(毫秒)
值大了会有一步一停顿的效果


<marquee scrolldelay=”10″ >scrolldelay=”10″ </marquee>