w3c验证中的html 5 marquee标记错误 [英] html 5 marquee tag error in w3c validation
本文介绍了w3c验证中的html 5 marquee标记错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在marquee标签中有一些文字。
I have some text in marquee tag.
<marquee direction="left" scrollamount="4">
Test Test Test Test Test
</marquee>
我使用的是html 5和css 3.当我在w3c验证器中检查我的html时,它显示了跟随错误。
I am using html 5 and css 3. When i check my html in w3c validator, it shows the following error.
Element marquee not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
<marquee direction="left" scrollamount="4">
如何解决这个问题?
推荐答案
Marquee标签不是html5(根本不是html,而是1995年的Microsoft专有标签)
Marquee tag is not html5 (is not html at all, but Microsoft proprietary tag from 1995)
你可以:
- 使用javascript为文字添加动画
- 使用css动画(不完全兼容浏览器)
- 使用 css3选框(不完全兼容浏览器)
- 使用选取框并忽略W3C警告(选框是完全兼容浏览器的,即使在iOS Safari中!)
- 不要使用选框效果(很难看)
- use javascript to animate your text
- use css animation (not fully browser compatible)
- use css3 marquee (not fully browser compatible)
- use marquee and ignore W3C warning (marquee is full browser compatible, even in iOS safari!)
- don't use marquee effect (it's ugly)
小心使用W3C验证器,它并不总是知道所有W3C规格!
Be careful with W3C validator, it is not always know all W3C specifications !
这篇关于w3c验证中的html 5 marquee标记错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文