是否可以改变HTML的速度 标签?

问题描述 投票:31回答:10

当一个选框离开屏幕然后在短时间间隙后从另一侧进入。有没有办法减少这个时间?

html marquee
10个回答
38
投票
<marquee behavior=scroll direction="left" scrollamount="5">Your message here</marquee>

scrollamount控制文本的速度:值越高,滚动速度越高


-2
投票

在HTML5上,scrollamount和scrolldelay属性不起作用。它们是被贬低的属性。


23
投票

我们可以使用scrollamount属性控制滚动速度,

例:

<marquee scrollamount="30">scrolling fast</marquee>
<marquee scrollamount="2">scrolling slow</marquee>

注意:如果指定最小数量,则滚动速度将减小,反之亦然


7
投票

没有具体的属性来控制它。无论如何,Marquee不是一个高度可靠的标签。您可能需要考虑使用jQuery和.animate()函数。如果您有兴趣追求该途径并需要代码,请告诉我。


6
投票

此属性占用时间(以毫秒为单位)。

延迟:100毫秒

<marquee scrolldelay="100">Scrolling text</marquee>

延迟:400毫秒

<marquee scrolldelay="400">Scrolling text</marquee>

4
投票

您可以使用scrollamount属性更改选取框标记的速度。

它接受整数值6作为默认速度,因此任何低于6的值都会减慢选取框效果。

示例:

<marquee scrollamount=4>Scrolling text</marquee>

阅读更多:http://code2care.org/pages/marquee-tag-scrollamount/

http://www.htmlcodetutorial.com/_MARQUEE_SCROLLAMOUNT.html

P.S:避免使用选框!


4
投票

为了提高Marquee文本的速度,您只需在下面的代码中添加如下内容:

<marquee scrollamount="Integer number">scrolling fast</marquee>

3
投票

scrolldelay="number"


1
投票

您可以通过添加scrolldelay来更改速度

<marquee style="font-family: lato; color: #FFFFFF" bgcolor="#00224f" scrolldelay="400">Now the Speed is Delay to 400 Milliseconds</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来控制速度..

© www.soinside.com 2019 - 2024. All rights reserved.