How to get z-index to play nice with the jQuery plugin Cycle

Take a look at the bottom right example on the [jQuery Cycle Advanced Demos page][1]. Notice how when it loops the gallery, the next image goes *beneath* the last, as opposed to others where the next image always covers the previous one? Well, at least in Firefox 3.6.3. I'm developing a custom animation with jQuery cycle that has the same problem. When it loops, the next image goes under instead of over. This is my config object I pass to `cycle()`. { fx: 'custom', timeout: 5000, easing: 'easeInOutQuad', pause: 1, cssFirst: { zIndex: 0 }, cssBefore: { display: 'block', top: -500, opacity: 1, zIndex: 1 }, animIn: { top: 0, opacity: 1 }, animOut: { opacity: .2 }, cssAfter: { display: 'none', opacity: .2, zIndex: 0 }, delay: -1000 } Basically the animation is the same as the `cover` fx, except the previous image should fade away as the next one comes down on top. Is there any way to get the next slide when it loops to cover the previous one? Thanks [1]:

以上就是How to get z-index to play nice with the jQuery plugin Cycle的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准