使用jQuery循环2如何显示下一张和上一张幻灯片的一部分 [英] With jQuery Cycle 2 how do I show a part of the next and previous slides
本文介绍了使用jQuery循环2如何显示下一张和上一张幻灯片的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在努力与这一段时间,现在已经看到一些非常复杂的基于JavaScript的解决方案。
I've been struggling with this for a while now and have seen some very complex JavaScript based solutions. I finally cracked it (for my needs anyway) with a minimal CSS solution.
推荐答案
本质上你移动overflow:hidden从幻灯片元素到更宽的父元素,然后在幻灯片元素上设置左边距。
Essentially you move the "overflow: hidden" from the slideshow element to a parent element that is wider, and then set a left margin on the slideshow element.
我更新了固定布局的JSFiddle:
http://jsfiddle.net/mledwards34/x89sQ/5/
I've updated a JSFiddle for a fixed layout: http://jsfiddle.net/mledwards34/x89sQ/5/
.slideshow-container {
overflow: hidden !important;
width: 300px;
}
.slideshow {
overflow: visible !important;
margin-left: 50px;
}
和响应式布局:
http://jsfiddle.net/mledwards34/x89sQ/6/
.slideshow-container {
overflow: hidden !important;
width: 50%;
}
.slideshow {
overflow: visible !important;
width: 80%;
margin-left: 10%;
}
这篇关于使用jQuery循环2如何显示下一张和上一张幻灯片的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文