⬆️ ⬇️

Marquee died long live marquee

image The <marquee> tag is well known. This tag allows you to create on the page the simplest animation in the form of smooth scrolling text. <marquee> appeared in Internet Explorer and is not a standard tag, however, it is supported by most browsers for compatibility purposes. These days, the W3C does not recommend using <marquee>.



However, not many people know that marquee finds life in a new face.



According to this specification (the latest edition of December 5 has the status of the W3C Candidate Recommendation) a set of properties will be introduced in CSS 3 to implement the marquee mechanism.



overflow-style



This property sets the style for the well-known overflow property. Accepts the following values:

auto - automatic selection

marquee-line - scroll horizontally;

marquee-block - scroll vertically.

')

marquee-style



Sets the animation style. Accepts the following values: scroll, slide, alternate.



marquee-play-count



Sets the number of repetitions for text animation. May be infinite.



marquee-direction



Sets the direction of the animation. Accepts values: forward or reverse.



marquee-speed



Sets the speed of the animation. Accepts values: slow, normal or fast.



Style definition example



li {

overflow-style: marquee-block;

marquee-play-count: infinite;

marquee-speed: slow;

marquee-style: scroll;

marquee-direction: reverse;

}



Conclusion



The funeral <marquee> took place a long time, but sometimes it can still be found on some pages on the Internet. With the advent of CSS3, such meetings will be more frequent, since this standard offers an alternative to the dead markup tag.

Source: https://habr.com/ru/post/48169/



All Articles