0

I write a html/css code, and find the <marquee> and <span>'s layout is strange:

enter image description here

if <marquee> is a inline element, the span will on the right of the marquee, but if I use the span float right, it will like this:

enter image description here

So the <marquee> is not a block element.

How does the <marquee> display in html?

s-n-2
  • 405
  • 1
  • 6
  • 24

1 Answers1

-1

You should avoid to use this tag: It's not a standard element. See yourself: https://www.w3.org/wiki/HTML/Elements/marquee

To replace it, you should use some javascript, or use a plugin :

https://remysharp.com/2008/09/10/the-silky-smooth-marquee/

You can achieve to do that in pure css to with animations : http://codepen.io/thomasbormans/pen/EjMBqO

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}
Thomas Rbt
  • 1,483
  • 1
  • 13
  • 26