Is the marquee HTML element supported by all browsers yet?

谁都会走 提交于 2019-11-26 17:51:31

问题


Is it all right to use <marquee> HTML element yet? I mean, is it supported by all browsers yet? I know Twitter is using it, I think it's quite good for announcements and I'd like to use it, but I don't know if it will work properly yet. Does anyone know?


回答1:


No, it was DEPRECATED by the W3C.

Good luck!

EDIT:

An alternative for marquee would be to display the whole string in a span or div, for accessibility.

EDIT2:

I can't be sure but at the first glance, twitter isn't using it, BUT even if they used it (which they shouldn't) you should not follow their bad example, they can make mistakes too! :)

EDIT3:

You say it works in all browsers, while this may be true, because modern browsers try to be as compatible as possible, but you should consider that that it is good discipline to always go along with the standards.

Why? A lot of reasons: for example, the mobile browser (every day more popular) don't have the memory to spare as desktop browsers like FF Chrome and IE and they might not display toy content correctly.

EDIT4:

I just got that you were talking about "moving" trending topics, I´m really sorry for the dela, for completeness sake, here is one example:

Demo:

http://remysharp.com/demo/marquee.html

Source:

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




回答2:


<marquee> and <blink>, along with abominations like bold pink 18pt text in comic sans on a light purple background, were all the rage with amateur web designers during the 90's because they're "neat", and were supposed to have experienced the true death when they shut down geocities.

The point is they're an eyesore. They keep animating forever. A much better plan would be to use javascript to scroll something in once, like when SO tells you you have new replies or that you've earned a badge. Once gets users' attention without distracting them the whole time they're on the page.




回答3:


Just use a span or div and make animations into it using jQuery or custom javascript :)



来源:https://stackoverflow.com/questions/3964491/is-the-marquee-html-element-supported-by-all-browsers-yet

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