jquery Paperfold实现折纸展开三维动画效果代码

代码语言:html

所属分类:动画

代码描述:jquery Paperfold实现折纸展开三维动画效果代码

代码标签: 折纸 展开 三维动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<!--
      Copyright (c) 2011 Felix Niklas
      This script is freely distributable under the terms of the MIT license.
-->
<head>
  <meta charset="utf-8" />
  <title></title>
<style>
    html {
    height: 100%;
}
body {
    width: 100%;
    height: 100%;
    font: 12px/15px "Helvetica Neue", sans-serif;
    background: #eee;
    margin: 0;
    perspective: 1000px;
    transform-style: preserve-3d;
    overflow: hidden;
}

h1 { 
    margin: 13px 0 34px;
    font-size: 34px;
}

h2 { margin: 34px 0 13px; }

#controls {
    left: 0;
    top: 0;
    width: 300px;
    bottom: 0;
    padding: 21px;
    border-right: 1px solid rgba(0,0,0,.21);
    box-shadow: 1px 0 white;
    position: absolute;
}
    #controls div {
        margin: 13px 0;
        color: gray;
        font-size: 13px;
    }
    p {
        margin: 0 3px;
        color: #aaa;
    }
    label {
        padding: 5px 3px;
        font-weight: normal;
        text-shadow: 0 1px 1px white;
        display: block;
    }
        label[for="showHelpers"] { display: inline-block; }
        .hasOutput {
            position: relative;
        }
            .hasOutput span {
                margin-left: 8px;
                font-size: 11px;
                color: #aaa;
            }
    input[type=range] {
        height: 40px;
        width: 300px;
        padding: 3px;
        appearance: none;
        vertical-align: bottom;
        background: linear-gradient(#ddd, #eee);
        border-radius: 5px;
        border: 1px solid rgba(0,0,0,.21);
        border-top-color: rgba(0,0,0,.34);
        box-shadow: 0 1px white, 0 1px 2px rgba(0,0,0,.13) inset;
        box-sizing: border-box;
    }
    label {
        position: relative;
    }
    #time123 {
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: none;
        position: relative;
        background: url(../img/time.png);
    }
        #time123:before {
            top: 0;
            content: "";
            width: 300px;
            height: 26px;
            border-top: 13px solid #eee;
            border-bottom: 13px solid #eee;
            border-right: 300px solid rgba(0,0,0,.13);
            border-radius: 0 2px 2px 0;
            box-sizing: border-box;
            position: absolute;
        }
    input::-webkit-slider-thumb {
        appearance: none;
        width: 35px;
        height: 34px;
        background: #eee;
        border-radius: 3px;
        border: 1px solid rgba(0,0,0,.34);
        box-shadow: 0 1px white inset, 0 1px rgba(0,0,0,.13);
    }

.playground {
    top: 0;
    right: 0;
    bottom: 0;
    left: 342px;
    position: absolute;
    transform-style: preserve-3d;
}

.box {
    width: 502px;
    margin: 0 auto;
    position: relative;
}

.box > h1 {
    font-size: 20px;
    color: rgba(124, 128, 130, 0.5);
    text-shadow: 0 1px rgba(255,255,255,.67);
}

.letter > h1 {
    color: rgba(124, 128, 130, 0.9);
    text-shadow: 0 1px rgba(255,255,255,.21);
}

.button,button {
    height: 26px;
    padding: 0 15px;
    font-size: 12px;
    line-height: 26px;
    color: white;
    text-shadow: 0 1px rgba(0,0,0,0.55);
    background-color: hsl(315,50%,50%);
    border: 1px solid rgba(0,0,0,0.21);
    border-bottom-color: rgba(0,0,0,0.34);
    border-radius: 3px;
    box-shadow: 
        0 1px 0 rgba(255,255,255,0.34) inset,
        0 2px 0 -1px rgba(0,0,0,0.13),
        0 3px 0 -1px rgba(0,0,0,0.08),
        0 3px 13px -1px rgba(0,0,0,0.21);
    display: inline-block;
    position: relative;
    cursor: pointer;
}
.button:hover,button:hover {
    background: linear-gradient(top, hsl(315,60%,55%), hsl(315,40%,50%));
}
.button:active,button:active {
    top: 1px;
    background: linear-gradient(top, hsl(315,50%,30%), hsl(315,50%,50%));
    border-color: rgba(0,0,0,0.34) rgba(0,0,0,0.21) rgba(0,0,0,0.21);
    box-shadow: 0 1px 0 rgba(255,255,255,0.89),0 1px rgba(0,0,0,0.05) inset;
    position: relative;
}

button.highlighted {
    height: 40px;
    width: 100px;
    display: block;
}
.buddycloud {
    padding: 21px;
    font:13px/19px "Helvetica Neue", Helvetica, Arial, sans-serif;
    transform-style: preserve-3d;
}

.buddycloud h1 {
    text-align: center;
}

.buddycloud .stream {
    margin: 8px 0 21px;
    width: 502px;
    border-radius: 5px;
    position: relative;
    transform-style: preserve-3d;
}

.buddycloud article {
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.13);
    transform-style: preserve-3d;
}

.buddycloud section {
    border-left: 1px solid rgba(0,0,0,0.13);
    border-right: 1px solid rgba(0,0,0,0.13);
}

.buddycloud article:first-child > section:first-child {
    border-radius: 5px 5px 0 0;
    border-top: 1px solid rgba(0,0,0,0.13);
}

.buddycloud article:last-child { border-bottom: none; }
.buddycloud article:last-child > section:last-child {
    border-radius: 0 0 5px 5px;
    border-bottom: 1px solid rgba(0,0,0,0.13);
    box-shadow: 0 2px 0 -1px white, 0 3px 0 -1px rgba(0,0,0,0.08);
}

.button.small,button.small{height:20px;line-height:20px;padding:0 10px;font-size:11px;line-height:20px;border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}
.button.callToAction,button.callToAction{color:#fff;text-shadow:0 1px rgba(0,0,0,0.13);border-color:rgba(0,0,0,0.34);border-bottom-color:rgba(0,0,0,0.55);background:#83ac35;box-shadow:0 1px 0 rgba(255,255,255,0.55) inset,0 1px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 0 rgba(255,255,255,0.55) inset,0 1px rgba(0,0,0,0.05);-ms-box-shadow:0 1px 0 rgba(255,255,255,0.55) inset,0 1px rgba(0,0,0,0.05);-o-box-shadow:0 1px 0 rgba(255,255,255,0.55) inset,0 1px rgba(0,0,0,0.05);box-shadow:0 1px 0 rgba(255,255,255,0.55) inset,0 1px rgba(0,0,0,0.05);}
.button.callToAction:hover,button.callToAction:hover{background:lighter(#83ac35,13%)}
.button.prominent,button.prominent{color:#fff;text-shadow:0 1px rgba(0,0,0,0.13);border-color:rgba(0,0,0,0.34);border-bottom-color:rgba(0,0,0,0.55);background:rgba(0,0,0,0.89);box-shadow:0 1px rgba(255,255,255,0.21) inset,0 1px rgba(0,0,0,0.05);-moz-box-shadow:0 1px rgba(255,255,255,0.21) inset,0 1px rgba(0,0,0,0.05);-ms-box-shadow:0 1px rgba(255,255,255,0.21) inset,0 1px rgba(0,0,0,0.05);-o-box-shadow:0 1px rgba(255,255,255,0.21) inset,0 1px rgba(0,0,0,0.05);box-shadow:0 1px rgba(255,255,255,0.21) inset,0 1px rgba(0,0,0,0.05);}
.button.prominent:hover,button.prominent:hover{background:#000}
.button.danger,button.danger{color:#fff;text-shadow:0 1px #600;background:#f00;}
.button.danger:hover,button.danger:hover{background:#f00}
.button.translucid,button.translucid,.button.translucid:hover,button.translucid:hover{background:none}
.button.checkbox,button.checkbox{padding-left:2px}
.buddycloud .controls{bottom:13px;right:13px;font-size:11px;position:absolute;}
.buddycloud .controls .button{margin-left:3px}
.buddycloud .postmeta{float:right;margin:0 0 0 13px;text-align:right;}
.buddycloud .postmeta nav{visibility:hidden}
.buddycloud .postmeta span{color:rgba(0,0,0,0.50);font-size:11.5px;line-height:19.5px;}
.buddycloud .postmeta span.time{display:block;color:rgba(0,0,0,0.34)}
.buddycloud .name{color: black; font-weight: bold; overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.buddycloud .name + .location{margin-left:5px;font-size:11px;line-height:19.5px;color:rgba(0,0,0,0.34)}
.buddycloud .opener:hover nav,.buddycloud .comment:hover nav{ visibility: visible; }
.buddycloud p { margin: 2px 0 0; color: black; }
.buddycloud .answer{position:relative;overflow:hidden;}
.buddycloud .answer textarea{margin-top:13px;padding:4px 5px 2px;height:28px;width:100%;font:12px/18px sans-serif;color:#808080;border:1px solid rgba(0,0,0,0.21);box-shadow:1px 1px #fff,inset 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:1px 1px #fff,inset 1px 1px rgba(0,0,0,0.05);-ms-box-shadow:1px 1px #fff,inset 1px 1px rgba(0,0,0,0.05);-o-box-shadow:1px 1px #fff,inset 1px 1px rgba(0,0,0,0.05);box-shadow:1px 1px #fff,inset 1px 1px rgba(0,0,0,0.05);position:relative;resize:none; box-sizing: border-box;}
.buddycloud .answer .avatar{ background-size: 40px 40px; background-repeat: no-repeat; height:40px; width:40px;left:23px;top:13px;display:none}
.buddycloud .answer .controls{bottom:13px; display:none}
.buddycloud .answer.write .avatar{display:block}
.buddycloud .answer.write textarea{margin-bottom:34px;height:40px;color:#000;resize:vertical}
.buddycloud .answer.write .controls{display:block}
.buddycloud .postcontent{white-space:pre-wrap;word-wrap:break-word}
.buddycloud .controls{bottom:13px;right:13px;font-size:11px;position:absolute;}
.buddycloud .controls .button{margin-left:3px}
.buddycloud .controls .postError{margin-left:5px;color:#f00;display:inline-block}
.buddycloud .message{min-height:14px;padding-left:66px;color:rgba(0,0,0,0.55);cursor:pointer;}
.buddycloud .message.new{background-color:rgba(0,0,0,0.08)}
.buddycloud .message.selected{color:#517312;background:#abe245;}
.buddycloud .message.selected .location,.buddycloud .message.selected .time{color:rgba(81,115,18,0.55)}
.buddycloud .message:last-child{box-shadow:none;-moz-box-shadow:none;-ms-box-shadow:none;-o-box-shadow:none;box-shadow:none}
.buddycloud .message .avatar{width:40px}
.buddycloud .message p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}

.buddycloud .opener{min-height:50px; padding: 13px 13px 13px 76px; }
.buddycloud .avatar{ left:14px; position: absolute; }

.buddycloud section {
    background-color: white;
}

.buddycloud .comment{min-height:40px;position:relative}
.buddycloud .comment, .buddycloud .answer{padding: 5px 13px 5px 76px;}
.buddycloud .answer { padding-top: 0; }
.buddycloud .answer:first-child{padding-left:50px;}
.buddycloud .answer:first-child.write .avatar{top:13px;left:-2px}
.buddycloud .answer:first-child textarea{margin-top:8px;width:399px}
.buddycloud .comment .avatar{ 
    background-size: 40px 40px;
    background-repeat: no-repeat;
    top: 8px;
    left: 25px;
    width: 40px;
    height: 40px;
    border-radius: 2px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 3px;
}

.user1 { background-image: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAUAAA/+4ADkFkb2JlAGTAA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Lk0nQDxQUFOUElJS80qvAsAHnwq6krHFbYK1NmK030JTa7nDmgy4SloSD/NYBKQeNK08fErHpQcdGahOMtVoa7dwjqaW0wlxC1imkVk08gT6cZ4+oVNfy+4EiMwfmEeE4Q0wpSQ4TlUoV4ScvWOCZb1BNLIelxufvHMklARVtGzbGQAIJAAHBSmOOfFHXHLKf8AO5v+yr8N2Of3XFgXcPdka0f9ekmFc5k9LTMaJla2dQok1onKcuDLypSyZl4kI4wc776b3TN7LPdXpKlOOoktvNp4EpNUaI5smORyppsxOacGl0JbbbpcYVyZkRV9cEtbE5EKRXKk/Xh5xTWGIRscXlDX+pEZuKstRVGQCUhRCQmvHXC/+Z+o4vOWNtTHs11m3K5klyrrigo15xWnMODBpQSQKFjkx4slxDjseSk1SasvH2j1a9OErkO1PqPXx59X7rTpwrgaM/ef8uSs/iOzqap1/Rg1e4tdsCSfyTa/wzwqtTvO+7PL6372FK/7pfNv+H0wSY9dyOp8U/4b33t8Ory4vdEDWwKfe+H7g59XOM3o5cbR4KsPjY3daw7rXz9nlx6ewase90/wN7ue8a59YefE/wAj5yh43yP6x7/t9x+3ThcaP//Z); }
.user3 { background-image: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAPAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCw.........完整代码请登录后点击上方下载按钮下载查看

网友评论0