简体   繁体   English

我正在使用带有插件的orbit-jquery-image-slider插件图像不滑动吗?

[英]I am Using orbit-jquery-image-slider plugin with plugin is image is not sliding?

im using orbit-jquery-image-slider plugin i can able give fade effect by doing this 'animation': 'fade' but not able slide image i tried to use 'animation': 'horizontal-push' but not working please help me 我正在使用orbit-jquery-image-slider插件,我可以通过执行以下'animation':'fade'来赋予淡入淡出效果,但无法滑动幻灯片,但我尝试使用'animation':'horizo​​ntal-push'但不能正常工作,请帮帮我

<script type="text/javascript">
    $(window).load(function () {
        $('#featured').orbit({
            'animation': 'horizontal-push',
            'bullets': true,
            advanceSpeed: 10000,
        });
        $('.slider-navs').css('position', 'relative');
        $('#featured').css('width', '650px');
        $('#featured').css('height', '210px');

    });

</script>
<div class="holder">
    <div class="above_cont_area " style="height:50px;height: 219px;width: 650px;margin-left: 25px;margin-bottom: 25px;">
        <div id="featured">
            <img src="dummy-images/img1.jpg" data-caption="#htmlCaption" />
            <img src="dummy-images/img2.jpg" data-caption="#htmlCaption" />
            <img src="dummy-images/img3.jpg" data-caption="#htmlCaption" />
            <img src="dummy-images/img4.jpg" data-caption="#htmlCaption" />
            <img src="dummy-images/img5.png" data-caption="#htmlCaption" />
            <img src="dummy-images/img6.png" data-caption="#htmlCaption" />
            <img src="dummy-images/img7.png" data-caption="#htmlCaption" />
            <img src="dummy-images/img8.png" data-caption="#htmlCaption" />
            <img src="dummy-images/img9.png" data-caption="#htmlCaption" />
        </div>
    </div>

This plugin requires all the image have the same size. 此插件要求所有图像具有相同的大小。 Do the added images have the same size? 添加的图像大小是否相同? The official website is here 官方网站在这里

The orbit function will dynamically determine the height and width of your set of images and scale accordingly, but make sure all your images are the same size or the larger images will peek out on the sides. 轨道功能将动态确定一组图像的高度和宽度并相应缩放,但请确保所有图像的大小相同,或者较大的图像会从侧面窥视。

If you want the fade effect means you have to give the animation as fade only not horizontal-push 如果要使用淡入淡出效果,则必须仅将动画设置为淡入淡出,而不是水平推动

$(window).load(function() {
    $('#featured').orbit({
            'animation': 'fade',
            'bullets': true,
            advanceSpeed: 10000
        });
  });

Another tricky catch 22, is that the .orbit-timer and .orbit-progress bar can't be hidden from the DOM with display none or the slideshow stops functioning. 另一个棘手的问题22是,无法从DOM中隐藏.orbit-timer和.orbit-progress栏,而无显示或幻灯片停止运行。

See the following 见以下

https://github.com/zurb/foundation/issues/1856#issuecomment-19422603 https://github.com/zurb/foundation/issues/1856#issuecomment-19422603

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM