选框问题
Issue with Marquee
本文关键字:问题 更新时间:2023-09-26
html 如何使用 JavaScript 停止 marquee 元素?
让
<marquee behavior="alternate" direction="right">hello</marquee>
当我将鼠标放在它上面时,我想停止移动文本 hello。
谢谢。
您可以简单地添加内联行为更改:
<marquee behavior="alternate" onmouseover="this.scrollAmount = 0"
onmouseout="this.scrollAmount=10" direction="right">hello</marquee>
演示
演示 - http://jsfiddle.net/h4ww3jsv/
<marquee onmouseover="this.stop();" onmouseout="this.start();" behavior="alternate" 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>
小提琴:http://jsfiddle.net/3kedfyos/3/
我建议也阅读 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee
相关文章:
- 在指令控制器中使用$attrs时出现问题
- 将PHP变量传递给jQuery时遇到问题
- Canvas Html5绘图应用程序,移动画布会导致重大问题
- 参数变量出现ngTable指令问题
- 剑道网格jQuery动画()问题
- 我的jQuery插件参数没有正确启动,遇到了问题
- Phonegap-(安卓/iphone)多个图像的图像库出现问题
- TableExport jquery插件:文件名和扩展名问题
- JavaScript Pub/Sub属性访问问题
- JavaScript异步问题
- 如何解决Yii中的页面刷新问题
- Safari(Mac OS)上的jQuery平滑滚动问题
- jqGrid树网格问题
- 使用正则表达式评估电子邮件地址时出现性能问题
- 如何消除代码中的未定义和其他问题
- JavaScript代码问题:我正在将对象转换为数组
- 三星智能电视应用程序;Brightcove示例应用程序远程控制问题
- 由于iframe导致的问题
- ReactJS和SpringDataRest缓存问题可能与websocket有关
- Backbone LayoutManager渲染问题