【发布时间】:2011-04-04 16:03:12
【问题描述】:
<marquee behavior="scroll" scrollamount="10" onmouseover="style.cursor='hand'; this.setAttribute('scrollamount', 0, 0);" onmouseout="this.setAttribute('scrollamount', 6, 0);" id="ticker" direction="right">
<div style="width:719px ;height:20px; font-family:Arial;color:red"id="ticker01">
<span>1/2/2011</span><a href="a.aspx">one</a>
<span>2/2/2011</span><a href="b.aspx">two</a>
<span>3/2/2011</span><a href="c.aspx">three</a>
<span>4/2/2011</span><a href="d.aspx">four</a>
</div>
</marquee>
在 IE8 中:GOOOOOOOD!!!!
显示:1/2/2011 一个 2/2/2011 两个 3/2/2011 三个 4/2/2011 四个
只有一行。
但是
在 Firefox 中:问题?????????
显示:
1/2/2011 one
2/2/2011 two
3/2/2011 three
4/2/2011 four
一起,几条线在移动
jquery,相当于有人做同样的事情,而且是从右到左依次是;;
【问题讨论】:
-
Marquee 标签已被 W3C 弃用。我建议寻找一个 jquery 替代品。
-
jquery 选框? :remysharp.com/demo/marquee.html
-
呃,原生的so好看多了。 jQuery 让它变得厚实...
-
具有讽刺意味的是,原生版本在很大程度上被弃用了,因为大多数最终用户发现它丑陋且令人讨厌。它被 Geocities 上的垃圾主页严重滥用。我不会错过的。
-
您发布的内容在最新的 Firefox 中对我来说效果很好:jsfiddle.net/ambiguous/f8fCF。您的样式表中发生了什么?
标签: javascript jquery html firefox marquee