jquery折纸效果

所属分类:其他-动画效果

 32223  348  查看评论 (1)
分享到微信朋友圈
X
jquery折纸效果 ie兼容10

ORIDOMI实现的jquery折纸效果效果非常棒

使用步骤

通过将您的目标元素传递给构造函数创建一个 OriDomi 实例:

var folded = new OriDomi(document.getElementsByClassName('paper')[0]);

...或是传递一个选择器字符串和 OriDomi 将使用匹配的第一个元素:

var folded = new OriDomi('.paper');

如果您更喜欢使用 jQuery,试试这个:

var $folded = $('.paper').oriDomi({/* options object */});
// when using jQuery, iterate OriDomi methods over multiple elements like this:
$folded.oriDomi('accordion', 20);
// to access the OriDomi instance at the top of the jQuery selection directly:
var folded = $folded.oriDomi(true);

参数配置

当创建新的 OriDomi 组成,则可以作为第二个参数传递一张地图的选项:

var folded = new OriDomi('.paper', {
  speed:           1200,  // folding duration in ms
  ripple:          2,     // backwards ripple effect when animating
  shadingIntesity: .5,    // lessen the shading effect
  perspective:     800,   // smaller values exaggerate 3D distortion
  maxAngle:        40,    // keep the user's folds within a range of -40 to 40 degrees
  shading:         'soft' // change the shading type
});

影响

大多数效果方法只需要一个折叠的角度作为其第一个参数。

folded.accordion(30);


您可以指定锚点以折从 (左、 右、 顶部或底部) 作为第二个参数:

folded.curl(-50, 'top');
foldUp()是一种独特效果方法不带角度参数,因为它会导致 OriDomi 组成完全卷起交错的方式。
// completely hides the element:
folded.foldUp();

回调

也许你会想当动画完成的时候做点什么吗?传递一个回调函数:

folded.curl(-50, 'top', function(event, instance) {
  // arguments are the transition event and the OriDomi instance
  alert('It seems my folding days are through.');
});

请记住参数是灵活。时离开了锚论点假定你最后使用锚点。OriDomi 通常可以找出你的意思:

folded.ramp(14, function() {
  alert('A callback as a second argument...');
});
相关插件-动画效果

3D签到墙 threejs(使用元素周期表修改)

采用threejs官方demo的元素周期更改的,展示为图片,可自动更换或手动更换,目前为旋转状态;模拟推送用户可以优化随机更改图片应该会更好点。
  动画效果
 67388  651

HTML5 Canvas下雪效果插件

飘雪效果,可设置控制数量
  动画效果
 44354  353

jQuery直播点击飘心效果,点赞桃心飘动效果

直播点击飘心效果,点赞桃心飘动效果,canvas画出桃心飘动效果
  动画效果
 45100  394

很酷的jQuery文字切换动画

文字切换动画,很简单很实用,适合做SLOGAN
  动画效果
 31702  335

讨论这个项目(1)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    ?F?o?r?e?v?e?r 0
    2017/4/9 21:07:19
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复