第一次使用 jquery cycle2。当我的幻灯片是图像时效果很好,但是当我的幻灯片是锚时,它不使用我指定的 scrollHorz 过渡效果。相反,过渡从锚点的右上角开始。
在下面的代码中,第一个幻灯片按预期工作,在第二个幻灯片中,过渡效果是某种未知类型(不是 scrollHorz)。
<div class="page">
<div class="cycle-slideshow"
data-cycle-fx=scrollHorz
data-cycle-timeout=0
>
<!-- empty element for caption -->
<div class="cycle-caption"></div>
<!-- prev/next links -->
<div class="cycle-prev"></div>
<div class="cycle-next"></div>
<img src="../Images/top-mod1.png" />
<img src="../Images/top-mod2.png" />
<img src="../Images/top-mod3.png" />
<img src="../Images/top-mod4.png" />
</div>
<div class="cycle-slideshow"
data-cycle-slides="a"
data-cycle-fx=scrollHorz
data-cycle-timeout=0
>
<!-- empty element for caption -->
<div class="cycle-caption"></div>
<!-- prev/next links -->
<div class="cycle-prev"></div>
<div class="cycle-next"></div>
<a href="http://www.google.com"><img src="../Images/top-mod1.png" /></a>
<a href="http://www.yahoo.com"><img src="../Images/top-mod2.png" /></a>
<a href="http://www.facebook.com"><img src="../Images/top-mod3.png" /></a>
<a href="http://www.weather.com"><img src="../Images/top-mod4.png" /></a>
</div>
</div>