14 回答
<marquee behavior=scroll direction="left" scrollamount="5">Your message here</marquee>
scrollamount controls the speed of text: higher the value higher is the scrolling speed
我们可以通过使用scrollamount
属性来控制滚动速度,
例子:
<marquee scrollamount="30">scrolling fast</marquee>
<marquee scrollamount="2">scrolling slow</marquee>
注意:如果指定最小数量,滚动速度会降低,反之亦然
此属性花费的时间以毫秒为单位。
延迟:100 毫秒
<marquee scrolldelay="100">Scrolling text</marquee>
延迟:400 毫秒
<marquee scrolldelay="400">Scrolling text</marquee>
没有专门的属性来控制它。无论如何,Marquee 并不是一个高度可靠的标签。您可能需要考虑使用 jQuery 和 .animate() 函数。如果您有兴趣追求该途径并需要代码,请告诉我。
您可以使用scrollamount属性更改选取框标签的速度。
它接受整数值 6 作为默认速度,因此任何低于 6 的值都会减慢选取框效果。
例子 :
<marquee scrollamount=4>Scrolling text</marquee>
阅读更多:http ://code2care.org/pages/marquee-tag-scrollamount/
http://www.htmlcodetutorial.com/_MARQUEE_SCROLLAMOUNT.html
PS:避免使用选框!
scrolldelay="number"
您可以通过添加滚动延迟来更改速度
<marquee style="font-family: lato; color: #FFFFFF" bgcolor="#00224f" scrolldelay="400">Now the Speed is Delay to 400 Milliseconds</marquee>
为了提高选框文本的速度,您只需要在下面的代码中添加这样的内容:
<marquee scrollamount="Integer number">scrolling fast</marquee>
提高文本使用属性的滚动速度
scrollamount
OR
scrolldelay
在“选框”标签中。放置任何整数值,表示您需要文本移动的速度
我只是做:
<marquee scrollamount="A number">Text here</marquee>
<marquee scrollamount="1">SLOW TEXT</marquee>
<marquee>DEFAULT SPEED TEXT</marquee>
<marquee scrollamount="10">FAST TEXT</marquee>
<marquee scrollamount="20">Faster text</marquee>
使用带有整数的滚动量:滚动量值越高,文本越快。
<marquee scrollamount="1">SLOW TEXT</marquee>
<marquee>DEFAULT SPEED TEXT</marquee>
<marquee scrollamount="10">FAST TEXT</marquee>
<marquee scrollamount="20">Faster text</marquee>
默认滚动速度为 6。
<marquee>Text</marquee>
<marquee scrollamount="6">Text</marquee>
<marquee scrollamount="30">Quick text</marquee>
<marquee scrollamount="90">Very Quick text</marquee>
<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>
使用滚动量来控制速度..
在 HTML5 上,滚动量和滚动延迟属性不起作用。它们是贬义的属性。