1

我正在使用选取框,它在 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都可以正常循环。请帮忙

4

2 回答 2

1

Marquee 和 Blink 不是标准的,许多较新的浏览器不再支持,包括 FF 和 IE 版本。对不起。

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

于 2013-09-09T13:08:10.680 回答
0

你不应该使用marquee标签,因为它不是标准的一部分,你不能保证浏览器的支持(理论上供应商可以随时放弃支持)。而是尝试一个简单的脚本解决方案,如this answer中所述,或者使用我写的这个超小脚本:

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

它在我测试的所有浏览器(Ch、FF、IE)中运行都比“本机”选框更流畅。

于 2013-09-09T13:15:56.113 回答