想要在鼠标悬停时停止选取框代码并在鼠标移出时启动它 但它在 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>
最佳答案
<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>
关于html - marquee 代码在 chrome 中工作但在 firefox 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21545720/