Marquee在firefox中无法正常工作

时间:2013-09-09 12:53:44

标签: html

我正在使用一个选框,它在chrome中运行良好,但在firefox中它只是一次又一次地显示第一个div。这是代码:

<marquee direction="up" scrollamount="3">           
     <div class="eachnews">

    <a href="#"> <div class="news-date"><span class="day_news">15</span><span class="month_news">Apr</span>
     </div>
     <div class="news-descript"><h2>News Title</h2>
     <p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen.
     </p>
     </div></a>
     </div>


         <div class="eachnews">

    <a href="#"> <div class="news-date"><span class="day_news">16</span><span class="month_news">Jan</span>
     </div>
     <div class="news-descript"><h2>News Title</h2>
     <p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen.
     </p>
     </div></a>
     </div>



         <div class="eachnews">

    <a href="#"> <div class="news-date"><span class="day_news">17</span><span class="month_news">Oct</span>
     </div>
     <div class="news-descript"><h2>News Title</h2>
     <p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen.
     </p>
     </div></a>
     </div>


         <div class="eachnews">

    <a href="#"> <div class="news-date"><span class="day_news">18</span><span class="month_news">Mar</span>
     </div>
     <div class="news-descript"><h2>News Title</h2>
     <p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen.
     </p>
     </div></a>
     </div>

     </marquee>     

它被写成“15 apr”的div只是在ff中重复,在chrome中所有的div都可以正常循环。请帮忙

2 个答案:

答案 0 :(得分:1)

Marquee和Blink不是标准配置,许多较新的浏览器不再支持它们,包括FF和IE版本。遗憾。

但是你可以使用javascript来模拟它们/重新实现它们,如果你真的必须的话。

答案 1 :(得分:0)

您不应该使用marquee标记,因为它不是标准的一部分,您无法保证浏览器的支持(理论上,供应商可能随时放弃支持)。而是尝试使用像stated in this answer这样的简单脚本解决方案,或者使用我写的这个超小型脚本:

http://jsfiddle.net/4kN5q/1/

在我测试的所有浏览器(Ch,FF,IE)中,它比“原生”选框更顺畅。