我的图像滑块有空白

My image slider has white spaces

本文关键字:空白 图像 我的      更新时间:2023-09-26

请参阅以下链接:http://www.beta.storeji.in/当图像滑动时,下一张图像不会出现,直到滑动完成并显示空白而不是图像。如何解决这个问题?

这是我的滑块javascript代码

function slide()
{
    if($('.current').is(':last-child')){
        $('.current').removeClass('current');
        $('#imgholder img:first-child').addClass('current');
        $('#imgholder').animate({left: '0px'});
    }
    else{
        $('.current').removeClass(function(){
            $(this).next().addClass('current');
            return 'current';
        });
        $('#imgholder').animate({left: '-=980'},{duration: 'slow', easing: 'easeOutBounce' });
        }
}
var loop_handle= setInterval("slide()",'5000');

你的picslider.css表单出现错误,宽度和高度没有正确设置;

#imgholder{
    position: absolute;
    width: 5880;
    height: 490;
    z-index: 0;
}

解决这个问题,它应该可以正常工作。

#imgholder{
    position: absolute;
    width: 5880px;
    height: 490px;
    z-index: 0;
}