1

我对 JS 比较陌生,我开始使用“AnythingSlider”JavaScript。

我面临的一个问题是我希望幻灯片按顺序“不间断”显示,例如,我希望幻灯片不断移动。

我曾尝试使用 .js 文件中的“Times”设置,但无法达到预期的效果。

    // Times
    delay               : 3000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
    resumeDelay         : 15000,     // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
    animationTime       : 600,       // How long the slideshow transition takes (in milliseconds)
    delayBeforeAnimate  : 0,         // How long to pause slide animation before going to the desired slide (used if you want your "out" FX to show).

有什么建议吗?

4

1 回答 1

1

试试这些选项(演示):

$('#slider').anythingSlider({

    // If true, builds the forwards and backwards buttons
    buildArrows: false,
    // If true, builds a list of anchor links to link to each panel
    buildNavigation: false,
    // If true, builds the start/stop button
    buildStartStop: false,

    // if false, keyboard arrow keys will not work for this slider.
    enableKeyboard: false,

    // If true, the slideshow will start running; replaces "startStopped" option
    autoPlay: true,
    // If true, user changing slides will not stop the slideshow
    autoPlayLocked: true,

    // If true & the slideshow is active, the slideshow will pause on hover
    pauseOnHover: false

});
  • 请注意,这些选项是唯一不同于默认设置的选项。我保留了演示中的所有选项,所以你可以玩:)
  • 如果我完全误解了你,你的意思是让滑块连续滑动,那么请注意,幻灯片之间总会有一个非常短暂的停顿;如果这是不可接受的,那么您可能需要找到另一个插件。抱歉 =(... 试试这些额外的设置(更新的演示):

    delay: 100,
    resumeDelay: 15000,
    animationTime: 3000,
    delayBeforeAnimate: 0
    
于 2013-01-19T02:32:27.947 回答