< marquee> html标签使用/替换 [英] <marquee> html tag usage/replacment

查看:126
本文介绍了< marquee> html标签使用/替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道< marquee> 标签是邪恶的。

如果滚动文本太糟糕了,相同的效果不会使它更好,对吧?



并且假设我决定有一些滚动文本(gasp)类型的CSS(3?)或HTML(5?)的方式来做到这是技术上正确的(即不是过时的)?



如果没有CSS / HTML解决方案,我应该使用:




  • Javascript会更重的下载并可能被关闭?),但是我得到了W3C正确和有效的,非贬低和聪明的奖励,



p>


  • 讨厌的< marquee> (< blink>< blink>)标记,这是轻量级的(19字节!),所有浏览器在所有渲染模式和所有doctypes完全支持(即使它不应该),但已被弃用?



感谢。



PS我认为一个新闻记者是一个有效的使用大门罩样式

P.P.S.如果有人告诉我,如果我不想要一个大的Javascript解决方案,我应该使用JQuery,因为它是轻量级的,我会在评论中拍摄他们



编辑: m添加JQuery标签,因为这似乎是得到许多专家对JS问题的注意的最好方法,它在这里不是完全无关的。

解决方案

这不是坏的效果。字幕,闪烁和字体标签的问题是,它们表达的不是您的内容的结构。


I know that <marquee> tags are evil.
If it is so bad to have scrolling text, then using JS to get the same effect doesn't make it any better, right?

And suppose I decided to have some scrolling text (gasp), is there some type of CSS(3?) or HTML(5?) way to do this that is technically correct (i.e. not deprecated)?

If there isn't a CSS/HTML solution, should I use:

  • Javascript, which will be heavier to download and might be turned off (is that a pro or a con?), but I get the bonus of being W3C correct and valid and non-deprecated and smart,

or should I use

  • the hated <marquee> (<blink><blink>) tag, which is lightweight (19 bytes!), fully supported by all browsers in all rendering modes and all doctypes (even though it shouldn't be), but is deprecated?

Thanks.

P.S. I think a news ticker is a valid use for marquee-style
P.P.S. If anybody tells me that if I don't want a heavy Javascript solution I should use JQuery because it is lightweight, I will shoot them in the comments

Edit: I'm adding JQuery tag since that seems to be the best way to get attention from a lot of experts on JS questions, and it is not totally unrelated here.

解决方案

It is not the effect that is bad. The problem with marquee, blink and font tags is that they convey presentation not structure of your content.

这篇关于&lt; marquee&gt; html标签使用/替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆