PFold演示三种不同的打开纸卡特效

来源:https://www.sucaihuo.com/js/683.html 2016-01-17 18:56浏览(469) 收藏

PFold.js是一款折叠纸片插件,支持定义折叠纸牌数量、折叠动画效果、折叠方向,而且还支持折叠结束后回调方法。
PFold演示三种不同的打开纸卡特效
分类:其它特效 > jQuery插件 难易:高级
查看演示 下载资源 下载积分: 20 积分

纸卡html

<div id="uc-container" class="uc-container">
    <div class="uc-initial-content">
        <span class="clickme">点击我</span>
    </div>
    <div class="uc-final-content">
        <div class="scrollwrap">
            <h3>Dear Sucaihuo,</h3>
            <p>I just wanted to let you know that you left the garage door open and all the monkeys could get away! Great job! How often did I tell you <span>NOT</span> to forget to close it. On top of all that you also left the gate open and now they are literally in the wild! Anyway, just wated to say <span>THANKS</span> for that!</p><p class="signature">Yours, Barbara</p>
        </div>
        <span class="close">x</span>
    </div>
</div>

引入并调用pfold.js纸卡插件

<script type="text/javascript" src="js/jquery.pfold.js"></script>
var $container = $('#uc-container'),
        pfold = $('#uc-container').pfold({
    easing: 'ease-in-out',
    folds: 3,
    folddirection: ['left', 'bottom', 'right']
});

$container.find('span.clickme').on('click', function() {
    pfold.unfold();
}).end().find('span.close').on('click', function() {
    pfold.fold();
});

pfold.js相关API参数

参数 描述 默认值
perspective 透视度 1200
speed 打开纸卡速度 450
easing 动画效果 linear
folddelay 折叠延迟时间 0
folds 折叠次数 2
folddirection 折叠方向顺序 ['right','top']
overlays 遮盖物 true
centered 是否居中 false
containerSpeedFactor [0 - 1] specify a different speed for the container's translation 1
containerEasing easing for the container transition this is only valid if centered is true linear

方法Method

onEndFolding onEndFolding : function() { return false; } -
onEndUnfolding onEndUnfolding : function() { return false; } -
标签: 纸卡paper贺卡
评论2
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

  • 头像 椅子
    09-13 09:43
    5***5
    很强大!酷
  • 头像 沙发
    03-10 10:47
    5***5
    非常的酷炫
1 2