javascript flexslider 中的垂直和水平滑动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16610981/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Vertical and horizontal slides in flexslider
提问by santyas
im trying to implement flexslider slides with vertical and simultaneous li by slide like carousel with fade effect but i cant find the correct behavior. My code:
我试图实现 flexslider 滑动,垂直和同时 li 滑动,如带有淡入淡出效果的旋转木马,但我找不到正确的行为。我的代码:
<div class="flexslider">
<ul class="slides">
<?php
while ($reg = mysql_fetch_array($sql)){
echo "<li> //VERTICAL
<span>".$reg['title']."</span>
<ul class=\"work\"> //HORIZONTAL
<li>
<img src=\"".$reg['title']."/images/01.jpg\" />
</li>
<li>
<img src=\"".$reg['title']."/images/02.jpg\" />
</li>
<li>
<img src=\"".$reg['title']."/images/03.jpg\" />
</li>
</ul>
</li>";
}
?>
</ul>
and the JS
和 JS
<script type="text/javascript">
$(window).load(function() {
$('.flexslider').flexslider({
animation: "fade",
animationLoop: false
});
});
</script>
What am I doing wrong?
我究竟做错了什么?
回答by Henrique Barcelos
As far as I understood, you want something like this:
据我了解,你想要这样的东西:
$('.flexslider').flexslider({
animation: "fade",
direction: "vertical",
animationLoop: false
});
If the inner images aren't animated, this should do it.
如果内部图像没有动画,这应该这样做。