HTML的<marquee>标签的速度可以改变吗?

44

当一个跑马灯从屏幕上离开后,经过短暂的时间间隔,它会从另一侧进入。有没有办法缩短这个时间?

当一个跑马灯从屏幕上离开后,想要尽可能快速地让其从另一侧进入,可以通过减少转换时间来实现。具体来说,可以尝试减少跑马灯完全消失和重新进入屏幕之间的时间间隔。

7
请注意,marquee标签从未成为标准的HTML,现已被弃用。 - Orbling
3
@Orbling - Marquee并没有被废弃。无法废弃曾经不是标准的东西。 - Alohci
2
@Alohci,这个用法已经被支持它的浏览器弃用了,标准显然不会将其弃用——因为它一开始就不是标准的一部分。 - Orbling
14个回答

1

Use scrollamount with an integer: The higher the scrollamount value, the faster the text.

<marquee scrollamount="1">SLOW TEXT</marquee>
<marquee>DEFAULT SPEED TEXT</marquee>
<marquee scrollamount="10">FAST TEXT</marquee>
<marquee scrollamount="20">Faster text</marquee>

Default scrollamount speed is 6.

<marquee>Text</marquee>
<marquee scrollamount="6">Text</marquee>
<marquee scrollamount="30">Quick text</marquee>
<marquee scrollamount="90">Very Quick text</marquee>


1
我只是做以下操作:
<marquee scrollamount="A number">Text here</marquee>

0
         <body>
         <marquee direction="left" behavior=scroll scrollamount="2">This is basic example of marquee</marquee>
         <marquee direction="up">The direction of text will be from bottom to top.</marquee>
         </body>

使用scrollamount控制速度。


-2

在HTML5中,scrollamount和scrolldelay属性不起作用。它们是废弃的属性。


这些属性被弃用在哪里了? - Josh Lee
1
请添加 HTML5 文档支持您的陈述,这将有助于 Stack Overflow 社区成员。 - dkb

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