0

有谁知道我如何确保在我的滑块上只使用长方体动画?我不是特别喜欢切片动作,但喜欢从左到右和从上到下的旋转立方体选项。我已经检查了文档,但只能看到如何更改切片动画的方向或设置为随机。

文档中提到的 JS 设置在这里:

JS

$.Slicebox.defaults = {
    // (v)ertical, (h)orizontal or (r)andom
    orientation : 'h',
    // perspective value
    perspective : 1200,
    // number of slices / cuboids
    // needs to be an odd number 15 => number > 0 (if you want the limit higher,  change the _validate function).
    cuboidsCount : 5,
    // if true then the number of slices / cuboids is going to be random    (cuboidsCount is overwitten)
    cuboidsRandom : false,
    // the range of possible number of cuboids if cuboidsRandom is true
    // it is strongly recommended that you do not set a very large number :)
    maxCuboidsCount : 5,
    // each cuboid will move x pixels left / top (depending on orientation). The   middle cuboid doesn't move. the middle cuboid's neighbors will move disperseFactor pixels
    disperseFactor : 0,
    // color of the hidden sides
    colorHiddenSides : '#222',
    // the animation will start from left to right. The left most cuboid will be   the first one to rotate
    // this is the interval between each rotation in ms
    sequentialFactor : 150,
    // animation speed
    // this is the speed that takes "1" cuboid to rotate
    speed : 600,
    // transition easing
    easing : 'ease',
    // if true the slicebox will start the animation automatically
    autoplay : true,
    // time (ms) between each rotation, if autoplay is true
    interval: 3000,
    // the fallback will just fade out / fade in the items
    // this is the time fr the fade effect
    fallbackFadeSpeed : 300,
    // callbacks
    onBeforeChange : function( position ) { return false; },
    onAfterChange : function( position ) { return false; },
    onReady : function() { return false; }
};

我没有复制所有的js代码,因为有很多!

4

1 回答 1

0

您只需将切片数更改为 1 cuboidsCount : 1

于 2013-12-17T00:01:19.883 回答