Javascript 有字幕的问题

Javascript 有字幕的问题,javascript,html,css,Javascript,Html,Css,html如何按照我的意愿阻止使用javascript的字幕元素 让, 当我把鼠标放在文本hello上时,我想停止移动它 谢谢。您只需在线添加行为更改: <marquee behavior="alternate" onmouseover="this.scrollAmount = 0" onmouseout="this.scrollAmount=10" direction="right">hello</marquee> 您只需内联添加行为更改: <marquee b

html如何按照我的意愿阻止使用javascript的字幕元素

让,

当我把鼠标放在文本hello上时,我想停止移动它


谢谢。

您只需在线添加行为更改:

<marquee behavior="alternate" onmouseover="this.scrollAmount = 0" 
onmouseout="this.scrollAmount=10" direction="right">hello</marquee>

您只需内联添加行为更改:

<marquee behavior="alternate" onmouseover="this.scrollAmount = 0" 
onmouseout="this.scrollAmount=10" direction="right">hello</marquee>

下面的代码在Mozilla v27上不起作用

<marquee behavior="alternate" onmouseover="this.scrollAmount = 0" 
onmouseout="this.scrollAmount=10" direction="right">hello</marquee>
此问题的解决方案是使用以下代码

<marquee onMouseOver="this.setAttribute('scrollamount', 0, 0);" OnMouseOut="this.setAttribute('scrollamount', 6, 0);">Hello</marquee> 
小提琴:


我还建议您阅读下面的代码,这些代码在Mozilla v27上不起作用

<marquee behavior="alternate" onmouseover="this.scrollAmount = 0" 
onmouseout="this.scrollAmount=10" direction="right">hello</marquee>
此问题的解决方案是使用以下代码

<marquee onMouseOver="this.setAttribute('scrollamount', 0, 0);" OnMouseOut="this.setAttribute('scrollamount', 6, 0);">Hello</marquee> 
小提琴:

我还建议您阅读演示-

你好demo-


hellohello已被弃用,不是吗?hello已被弃用,不是吗?出于这个原因,我附加了来自mozilla的链接,看看他们有什么要说的。出于这个原因,我附加了来自mozilla的链接,看看他们有什么要说的