如何在JavaScript中停止鼠标悬停时的字幕幻灯片放映?
问题描述:
我想在鼠标悬停时停止幻灯片放映,并在鼠标悬停时开始幻灯片放映.
我在堆栈溢出中看到了一些建议.
因为我没有任何解决方案(可能是我根据我的代码理解其他代码的错误.因此,我给出了我的代码).
I want to stop slide show on mouse over and start on mouse out.
I saw some suggestions in stack overflow.
In that i didn't get any solution (may be this is my fault to understand the others code according to my code. So because of that i am giving my code).
<marquee height="80%" width="600px" direction="left" scrolldelay="120" align="middle">
<div class="itemMar"><img src="http://static.ddmcdn.com/gif/storymaker-best-hubble-space-telescope-images-20092-514x268.jpg" width="120px" height="120px" border="5"/><br /><p style="text-align: center;">name</p><p style="text-align: center;">0123456789</p><p style="text-align: center;">ssc</p>
</div>
<div class="itemMar"><img src="http://static.ddmcdn.com/gif/storymaker-best-hubble-space-telescope-images-20092-514x268.jpg" width="120px" height="120px" border="5"/><br /><p style="text-align: center;">name</p><p style="text-align: center;">0123456789</p><p style="text-align: center;">ssc</p>
</div>
<div class="itemMar"><img src="http://static.ddmcdn.com/gif/storymaker-best-hubble-space-telescope-images-20092-514x268.jpg" width="120px" height="120px" border="5"/><br /><p style="text-align: center;">name</p ><p style="text-align: center;">0123456789</p><p style="text-align: center;">ssc</p>
</div>
<div class="itemMar"><img src="http://static.ddmcdn.com/gif/storymaker-best-hubble-space-telescope-images-20092-514x268.jpg" width="120px" height="120px" border="5"/><br /><p style="text-align: center;">name</p ><p style="text-align: center;">0123456789</p><p style="text-align: center;">ssc</p>
</div>
</marquee>
答
尝试一下
<marquee behavior="scroll" direction="left" onmousedown="this.stop();" onmouseup="this.start();"></marquee>
<marquee behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();"></marquee>