# Html marquee

**URL:** <https://casparcgforum.org/t/html-marquee/3177>\
**Category:** General\
**Created:** [May 31, 2020, 6:56am UTC](https://casparcgforum.org/t/html-marquee/3177 "2020-05-31T06:56:48Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mhs\_mahdi](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@Mhs\_mahdi](https://casparcgforum.org/u/Mhs_mahdi)\
**Post date:** [May 31, 2020, 6:56am UTC](https://casparcgforum.org/t/html-marquee/3177/1 "2020-05-31T06:56:48Z")

</div>

Hi there,  
Im using html marquee tag for building scrolling subtitle  
But it has poor quality and not smooth in rolling  
What you do for rolling/scrolling texts in html?

---

<div class="post-metadata">

**Author:** ![Jarda](https://casparcgforum.org/user_avatar/casparcgforum.org/jarda/32/1055_2.png) [@Jarda](https://casparcgforum.org/u/Jarda)\
**Post date:** [May 31, 2020, 9:21am UTC](https://casparcgforum.org/t/html-marquee/3177/2 "2020-05-31T09:21:38Z")

</div>

Try css animation with keyframes on “left” or “top” parameter.

---

<div class="post-metadata">

**Author:** ![Mhs\_mahdi](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@Mhs\_mahdi](https://casparcgforum.org/u/Mhs_mahdi)\
**Post date:** [May 31, 2020, 9:44am UTC](https://casparcgforum.org/t/html-marquee/3177/3 "2020-05-31T09:44:32Z")

</div>

Thats good idea but I want to marquee in half of screen and by animation it isnt possible

---

<div class="post-metadata">

**Author:** ![Jarda](https://casparcgforum.org/user_avatar/casparcgforum.org/jarda/32/1055_2.png) [@Jarda](https://casparcgforum.org/u/Jarda)\
**Post date:** [May 31, 2020, 10:48am UTC](https://casparcgforum.org/t/html-marquee/3177/4 "2020-05-31T10:48:27Z")

</div>

Unfortunately I can’t imagine Your use, but deprecated marquee tag will never be smooth in my opinion. Try to give an example here.

---

<div class="post-metadata">

**Author:** ![Mhs\_mahdi](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@Mhs\_mahdi](https://casparcgforum.org/u/Mhs_mahdi)\
**Post date:** [May 31, 2020, 11:00am UTC](https://casparcgforum.org/t/html-marquee/3177/5 "2020-05-31T11:00:45Z")

</div>

I just have a backgruond image with limit width that I want to just move my text on it and when text ritch to the end of image disappear

---

<div class="post-metadata">

**Author:** ![Jarda](https://casparcgforum.org/user_avatar/casparcgforum.org/jarda/32/1055_2.png) [@Jarda](https://casparcgforum.org/u/Jarda)\
**Post date:** [May 31, 2020, 11:27am UTC](https://casparcgforum.org/t/html-marquee/3177/6 "2020-05-31T11:27:36Z")

</div>

You can use div with text (with z-index greater than the image has) and apply the css “clip” property to mask the area where the text will be visible. Then it will no longer be a problem to use css animation.

---

<div class="post-metadata">

**Author:** ![Mhs\_mahdi](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@Mhs\_mahdi](https://casparcgforum.org/u/Mhs_mahdi)\
**Post date:** [May 31, 2020, 1:41pm UTC](https://casparcgforum.org/t/html-marquee/3177/7 "2020-05-31T13:41:42Z")

</div>

Ok, and how solve different speeds in different size of texts?

---

<div class="post-metadata">

**Author:** ![Jarda](https://casparcgforum.org/user_avatar/casparcgforum.org/jarda/32/1055_2.png) [@Jarda](https://casparcgforum.org/u/Jarda)\
**Post date:** [May 31, 2020, 2:55pm UTC](https://casparcgforum.org/t/html-marquee/3177/8 "2020-05-31T14:55:06Z")

</div>

You can measure the size of rendered text (width or height) and then set the css animation-duration property by Javascript

---

<div class="post-metadata">

**Author:** ![Mhs\_mahdi](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@Mhs\_mahdi](https://casparcgforum.org/u/Mhs_mahdi)\
**Post date:** [May 31, 2020, 6:30pm UTC](https://casparcgforum.org/t/html-marquee/3177/9 "2020-05-31T18:30:47Z")

</div>

Yeah I got  
Thanks a lot

---

<div class="post-metadata">

**Author:** ![hreinnbeck](https://casparcgforum.org/user_avatar/casparcgforum.org/hreinnbeck/32/154_2.png) [@hreinnbeck](https://casparcgforum.org/u/hreinnbeck)\
**Post date:** [May 31, 2020, 8:58pm UTC](https://casparcgforum.org/t/html-marquee/3177/10 "2020-05-31T20:58:25Z")

</div>

The best way to move text smoothly is to do it be a fixed amount, like 2-4px every frame. RequestAnimationFrame and transform: translate works great for this.

---

<div class="post-metadata">

**Author:** ![bencius](https://casparcgforum.org/letter_avatar_proxy/v4/letter/b/779978/32.png) [@bencius](https://casparcgforum.org/u/bencius)\
**Post date:** [June 2, 2020, 3:59pm UTC](https://casparcgforum.org/t/html-marquee/3177/11 "2020-06-02T15:59:59Z")

</div>

Hey, could you give a working example? 😉 I would like to do some testings.

---

<div class="post-metadata">

**Author:** ![rrebuffo](https://casparcgforum.org/user_avatar/casparcgforum.org/rrebuffo/32/165_2.png) [@rrebuffo](https://casparcgforum.org/u/rrebuffo)\
**Post date:** [June 2, 2020, 4:19pm UTC](https://casparcgforum.org/t/html-marquee/3177/12 "2020-06-02T16:19:20Z")

</div>

> [@Hardware question : which Graphics card should I choose？](https://casparcgforum.org/t/hardware-question-which-graphics-card-should-i-choose/3067/20):
>
> Right now i use ProRes444 with alpha channel. I’ve tried the quicktime animation encode, but the opacity gradient did’t work well. it was like play an 8bit video on a 10bit screen. As the crawler you said, I just use a js searched on the internet , I uploaded it to google drive , you can download it [here](https://drive.google.com/open?id=1buYnMWmrm7dDLGfRhMCaGUPcTpSWjWvA) if you like, I’ve change the comments of the js file into English.

---

<div class="post-metadata">

**Author:** ![Mhs\_mahdi](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@Mhs\_mahdi](https://casparcgforum.org/u/Mhs_mahdi)\
**Post date:** [June 3, 2020, 8:30am UTC](https://casparcgforum.org/t/html-marquee/3177/13 "2020-06-03T08:30:36Z")

</div>

I finally use this way:  
[https://www.w3schools.com/js/tryit.asp?filename=tryjs\_dom\_animate\_3](https://www.w3schools.com/js/tryit.asp?filename=tryjs_dom_animate_3)

---

<div class="post-metadata">

**Author:** ![Jarda](https://casparcgforum.org/user_avatar/casparcgforum.org/jarda/32/1055_2.png) [@Jarda](https://casparcgforum.org/u/Jarda)\
**Post date:** [June 5, 2020, 8:26pm UTC](https://casparcgforum.org/t/html-marquee/3177/14 "2020-06-05T20:26:39Z")

</div>

English would be better 😀  
Could You attach a html fragment too? I’m not sure I understood it correctly.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Mhs\_mahdi](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@Mhs\_mahdi](https://casparcgforum.org/u/Mhs_mahdi)\
**Post date:** [September 7, 2020, 2:24pm UTC](https://casparcgforum.org/t/html-marquee/3177/15 "2020-09-07T14:24:09Z")

</div>

Can you explain more please?

---

<div class="post-metadata">

**Author:** ![ouellettec](https://casparcgforum.org/user_avatar/casparcgforum.org/ouellettec/32/596_2.png) [@ouellettec](https://casparcgforum.org/u/ouellettec)\
**Post date:** [September 8, 2020, 3:57am UTC](https://casparcgforum.org/t/html-marquee/3177/16 "2020-09-08T03:57:12Z")

</div>

I would recommend [GreenSock’s Animation Library GSAP](https://greensock.com/). The library is pretty widely used and removes a lot of the complexity in animation.  
Here is [a pen](https://codepen.io/chrisryanouellette/pen/XWdZXEg?editors=1111) with a very simple example.
