0

快速的问题是否有人知道我将如何创建这种效果,其中图像滑过每个的顶部.. 只需要一些指针来开始我还没有真正知道从哪里开始..

http://denicler.eu/en/lookbooks/1

设法使用绝对绝对位置和 z 索引来堆叠我的图像,但无法让我的图像相互滚动.. :s 任何建议伙计们

 #lookbook img{
width: 100%;
position: absolute;
top: 0px;
 }

img#image1 {

z-index: 100;
 }

  img#image2 {

top: 0px;
z-index: 20;
  }
   img#image3 {

z-index: 30;
  }
  img#image4 {

z-index: 40;
 }
  img#image5 {

z-index: 50;
 }
 img#image6 {

z-index: 60;
 }
 img#image7 {

z-index: 70;
  }
  img#image8 {

z-index: 80;
  }
  img#image9 {

z-index: 90;
  }

defo 在这里需要一些 javascript 来修复图像,当它到达顶部时任何帮助家伙

设法得到这个,但似乎对任何人都没有任何帮助,哈哈

  $(document).ready( function() {
    $(window).scroll( function() {
      if ($(window).scrollTop() > $('#lookbook img').offset().top)
        $('#lookbook img').addClass('fixed');
       else
        $('#lookbook img').removeClass('fixed');
      } );

   } );
4

1 回答 1

0

根据您想要滑动图像的方式(垂直或水平),您可以从查看thisthis开始。这两个链接将帮助您移动图像。然后,您可以通过参考此处指定通过使用 z-index 来指定什么内容

于 2013-05-14T13:45:57.090 回答