希望在鼠标悬停时停止选取代码并在鼠标输出时启动它 但它在chrome中运行良好,但在firefox中无法运行
我的代码是:
<marquee direction="up" onmouseover="this.stop();" onmouseout="this.start();">
<h4>Writing</h4>
<p class="content">Get a professional resume written by experts</p><br/>
<h4>Certifications</h4>
<p class="content">Exhibit your skills to catch the eyes of recruiters</p>
</marquee>
答案 0 :(得分:3)
<div style="position:absolute; top:0px; left:0px; right:0px; height:80px; overflow:hidden; display:block; border:solid 1px gray; padding:2px; border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px;">
<marquee behavior="scroll" direction="left" scrollamount="5" style="width:100%; height:100%; vertical-align:middle; cursor:pointer;" onmouseover="javascript:this.setAttribute('scrollamount','0');" onmouseout="javascript:this.setAttribute('scrollamount','5');">
Any text, images, divs, ...
</marquee>
</div>
答案 1 :(得分:0)
W3C标准不鼓励使用Marquee。也许你可以使用javascript或jQuery效果来使它工作。点击此链接:http://remysharp.com/2008/09/10/the-silky-smooth-marquee/ 希望这有帮助!
答案 2 :(得分:0)
以下代码在chrome和firefox中都有用
<marquee behavior="scroll" direction="up" onMouseOver="this.setAttribute('scrollamount', 0, 0);this.stop();" OnMouseOut="this.setAttribute('scrollamount', 2, 0);this.start();" height="120px" scrollamount="2">testing scroll up </marquee>