【问题标题】:Set marquee scrolling to default starting position将选取框滚动设置为默认起始位置
【发布时间】:2013-08-26 08:57:59
【问题描述】:

我在 html 中有一个连续的图像滚动(选框)。我想创建一个选取框,当鼠标悬停事件激活时应该停止并且图像应该设置为其起始位置。鼠标移出时,选框应该必须再次开始滚动。

我怎么能创造它? JQUERY中有什么方法吗?

【问题讨论】:

    标签: jquery html css image marquee


    【解决方案1】:

    您没有在您的问题中提供太多信息,但基本上您可能希望将mouseenter 和mouseleave 事件挂在选框上。 (jQuery 为原生不支持它们的浏览器提供了它们。)

    $("selector for the marquee")
        .mouseenter(function() {
            // stop the marquee, set the element positions as you want them
        })
        .mouseleave(function() {
            // restart it
        });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-20
      • 1970-01-01
      • 2018-05-07
      • 1970-01-01
      • 2016-04-21
      • 1970-01-01
      相关资源
      最近更新 更多