Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 HTML 的新手。我正在使用<marquee>标签。
<marquee>
有没有办法将文本移动的方向从右向左更改为圆形或向上?
另外,我可以改变这些跑马灯的速度吗?
您可以使用标签创建滚动字幕(即滚动文本或滚动图像)。它可以完全定制。您对修改滚动文本的方向和速度感兴趣,这可以通过添加一些属性来实现。
例如,一个示例 html 代码:
<marquee behavior="scroll" direction="left" scrollamount="1">Pace-slow</marquee>
这里的属性方向可以取值,如左,上,右等,具体取决于滚动方向,滚动量可以控制速度,越多越快。
<!-- 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>
附加参考: 在此处输入链接描述 在此处 输入链接描述