今天操作的是一个,百叶窗效果的一个页面特效,好,现在直接上最终效果吧。demo做的有点low,不过效果都在了
这是html和css代码:思路就是,每一个li里面div,放几个p,通过调节translatY,来控制。
*{ padding: 0; margin: 0; list-style: none; } #bai{ width: 400px; height: auto; float: left; margin-left:20px auto; } li{ text-align: center; width: 100%; height: 50px; line-height: 50px; border-bottom: 1px dashed #000; position: relative; overflow: hidden; } div.box{ width: 100%; height: 50px; position: absolute; top: -50px; } p{ height: 50px; }
1111111111111111
22222222222222222
33333333333333333
44444444444444444
55555555555555555
66666666666666666
77777777777777777
88888888888888888
关键在这里:可以来这里下载
导入这个,这个插件怎么用呢?具体的我就不讲了,可以看这里 ,这篇文章讲的挺好的。关键就是,move()里面取代的对象,跟jquery $取DOM节点对象一样,下面简单的陈了一些方法
move('.square')
.to(500, 200)
.rotate(180)
.scale(.5)
.set('background-color', '#FF0551')
.set('border-color', 'black')
.duration('3s')
.skew(50, -10)
.then()
.set('opacity', 0)
.duration('0.3s')
.scale(0.1)
.pop()
.end();
接下来,放上接下来全部js代码,整体思路是,两个定时器,一个定时器来定时总的时间,多久后开始,第二次定时器,是每个小div,依次多久执行动画。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持考高分网!



