With jQuery Cycle 2 how do I show a part of the next and previous slides

廉价感情. 提交于 2019-12-08 09:38:21

问题


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.


回答1:


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.

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;
}

and a responsive layout: http://jsfiddle.net/mledwards34/x89sQ/6/

.slideshow-container {
    overflow: hidden !important;
    width: 50%;
}

.slideshow {
    overflow: visible !important;
    width: 80%;
    margin-left: 10%;
}


来源:https://stackoverflow.com/questions/26427318/with-jquery-cycle-2-how-do-i-show-a-part-of-the-next-and-previous-slides

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!