Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/378.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jcarousel在铬合金中未达到100%时偏离位置_Javascript_Jquery_Carousel - Fatal编程技术网

Javascript jcarousel在铬合金中未达到100%时偏离位置

Javascript jcarousel在铬合金中未达到100%时偏离位置,javascript,jquery,carousel,Javascript,Jquery,Carousel,我使用Sorgilla jcarousel,只是想知道为什么只有在Google Chrome中,当我放大或缩小时,而不是在100%时,旋转木马的位置完全关闭了,有人能发现一些明显的东西吗。 我不知道具体的代码发布,但这里是2转盘被调用。两者都有同样的问题。 我假设这和像素不调整大小有关,但这在其他浏览器中不是问题 任何帮助都很好,谢谢 <script type="text/javascript"> jQuery(document).ready(function() { jQuery(

我使用Sorgilla jcarousel,只是想知道为什么只有在Google Chrome中,当我放大或缩小时,而不是在100%时,旋转木马的位置完全关闭了,有人能发现一些明显的东西吗。 我不知道具体的代码发布,但这里是2转盘被调用。两者都有同样的问题。 我假设这和像素不调整大小有关,但这在其他浏览器中不是问题

任何帮助都很好,谢谢

<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#mycarousel').jcarousel({
    start: 2, // Configuration goes here
    wrap: "circular",
    scroll: 1,
    auto:7
});
});

jQuery(document).ready(function() {
jQuery('#top-carousel').jcarousel({
    start: 2, // Configuration goes here
    wrap: "circular",
    auto: 12,
    scroll: 1

});
});
</script>

jQuery(文档).ready(函数(){
jQuery(“#mycarousel”).jcarousel({
start:2,//这里是配置
包装:“圆形”,
卷轴:1,
汽车:7
});
});
jQuery(文档).ready(函数(){
jQuery(“#顶部旋转木马”).jcarousel({
start:2,//这里是配置
包装:“圆形”,
汽车:12,,
卷轴:1
});
});

您可以使用适合我的变通方法。 这不是最好的解决方案,您可以尝试改进它。 以下是如何更改代码

jQuery(document).ready(function() {
var animation = $.browser.safari ? null : "normal";
jQuery('#mycarousel').jcarousel({
    start: 2, // Configuration goes here
    wrap: "circular",
    scroll: 1,
    auto:7,
    animation: animation,
        itemLoadCallback: {
            onBeforeAnimation: function (instance) {
                if ($.browser.safari) {
                    var itemPos = instance.first;
                    var pageWidth = instance.container.width();
                    var expectedItemPos = pageWidth * (1 - itemPos);
                    instance.container.prevObject.animate({ "left": expectedItemPos + "px" });
                }
            }
        }
});
});
上面的代码用于从左到右的转盘。 关于jcarousel配置的附加信息,您可以找到