改变<marquee>标签的速度和方向

3

我是HTML的新手,我正在使用<marquee>标签。

有没有一种方法可以将文字运动的方向从右到左改为其他方向或者从上到下?

另外,我可以改变这些跑马灯运行的速度吗?


请查看此处:http://www.plus2net.com/html_tutorial/html_marquee_direction.php - Pandian
2个回答

3
您可以使用标签来创建滚动字幕(即滚动文本或滚动图像)。它可以完全定制。如果您想修改滚动文本的方向和速度,可以添加一些属性。
例如,以下是一个示例HTML代码:
<marquee behavior="scroll" direction="left" scrollamount="1">Pace-slow</marquee>

这里的属性direction可以取值LEFT、UP、RIGHT等,取决于滚动的方向,而scroll amount可以控制速度,数值越大速度越快。


1

<!-- Scroll Amount -->
<marquee scrollamount="50"> This is a marquee with scrollamount 50 </marquee>
<marquee scrollamount="5"> This is a marquee with scrollamount 5 </marquee>

<!-- Scroll Delay -->
<marquee scrolldelay="50">This is a marquee with scrolldelay  50</marquee>
<marquee scrolldelay="100">This is a marquee with scrolldelay  100</marquee>

<!-- mouse over or click events -->
<marquee onmouseover="this.stop()" onmouseout="this.start()">This marquee will stop on mouseover.</marquee>
<marquee onclick="this.stop()">This marquee will stop on mouseclick. </marquee>

其他参考资料: 在此输入链接描述 在此输入链接描述


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接