Is it possible to change the speed of HTML's <marquee> tag?

∥☆過路亽.° 提交于 2019-12-03 11:31:25

问题


When one marquee leaves the screen then after a short time gap it enters from another side. Is there any way to reduce this time?


回答1:


<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




回答2:


we can control the scrolling speed by using the scrollamount attribute,

Example:

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

note:if you specify the minimum number, the scrolling speed will be reduce vice versa




回答3:


This attribute takes the time in milliseconds.

Delay : 100 Milliseconds

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

Delay : 400 Milliseconds

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



回答4:


There isn't specifically an attribute to control that. Marquee isn't a highly reliable tag anyways. You may want to consider using jQuery and the .animate() function. If you are interested in pursuing that avenue and need code for it, just let me know.




回答5:


You can change the speed of marquee tag using scrollamount attribute.

It accepts integer values 6 being the default speed, so any value lower then 6 will slow down the marquee effect.

Example :

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

Read more : http://code2care.org/pages/marquee-tag-scrollamount/

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

P.S : Avoid using marquee!




回答6:


In Order to increase speed of your Marquee text you just need to add like this in your code below:

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



回答7:


scrolldelay="number"




回答8:


You can Change the speed by adding scrolldelay

<marquee style="font-family: lato; color: #FFFFFF" bgcolor="#00224f" scrolldelay="400">Now the Speed is Delay to 400 Milliseconds</marquee>



回答9:


To increase scroll speed of text use attribute

scrollamount
OR
scrolldelay

in the 'marquee' tag. place any integer value which represent how fast you need your text to move




回答10:


         <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>

use scrollamount to control speed..




回答11:


On HTML5 the scrollamount and the scrolldelay attributes do not work. They are depricated attributes.



来源:https://stackoverflow.com/questions/4227462/is-it-possible-to-change-the-speed-of-htmls-marquee-tag

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!