Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change pace and direction of <marquee>

Tags:

html

marquee

I am a newbie in HTML. I am using <marquee> tag.

Is there a way to change the direction of text movement from right to left to otherway round or top-up?

Also, can I change the pace at which these marquee run?

like image 369
Priyanka Sharma Avatar asked Sep 15 '25 00:09

Priyanka Sharma


2 Answers

You can create a scrolling marquee (i.e. scrolling text or scrolling images) by using the tag. It can be completely customized. In your you are interested in modifying the direction and pace of scrolling text, which is possible by adding some attributes.

For example, a sample html code:

<marquee behavior="scroll" direction="left" scrollamount="1">Pace-slow</marquee>

Here attribute direction can take values like LEFT,UP,RIGHT etc depending on direction of scroll and scroll amount can control the speed, more the faster.

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

Additional reference : enter link description here enter link description here

like image 34
Ani Menon Avatar answered Sep 17 '25 13:09

Ani Menon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!