HTML5+CSS3卡片抽出动画代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 HTML5+CSS3卡片抽出动画代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

HTML5+CSS3卡片抽出动画代码

HTML代码(index.html):

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>HTML5+CSS3卡片抽出动画</title>
    <link rel="stylesheet" href="css/style.css" media="screen" type="text/css" />
</head>
<body>
    <div class="container">
        <div class="folder">
            <div class="paper">
                <h1>Sample paper</h1>
                <p>Lorem ipsum dolor sit amets, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
                <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
                <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
            </div>
            <div class="cover">
                <div class="title">Don't open</div>
            </div>
        </div>
    </div>
    <script src='js/jquery.js'></script>
    <script src="js/index.js"></script>
</body>
</html>







JS代码(index.js):

$(document).on('click','.folder',function(){
	$(this).toggleClass('opened');
}
);
	

CSS代码(style.css):

/* Generates the negative triangle as part of a offset with:before and:after $location:Where you want the negative triangle [top,right,bottom,left] $position:In percentage where the negative triangle should be placed. With 50% the cut out triangle is in the center. $size:How much will the surface be extruded in order to cut out the triangle. Can be any valid size (px,em,rem,% etc.) $color:The color of the extruded part where the triangle gets cut out*/
*,*:before,*:after{box-sizing:border-box;}
html,body{height:100%;background-color:#644812;}
.container{position:relative;width:100%;height:100%;}
.container > .folder{width:220px;height:180px;left:calc(50% - 110px);top:calc(70% - 90px);position:absolute;}
.container > .folder > .cover{cursor:pointer;position:absolute;width:100%;height:100%;background-color:#fab62f;-moz-border-radius:0 0 10px 10px;-webkit-border-radius:0;border-radius:0 0 10px 10px;-moz-box-shadow:5px 5px rgba(0,0,0,0.2);-webkit-box-shadow:5px 5px rgba(0,0,0,0.2);box-shadow:5px 5px rgba(0,0,0,0.2);}
.container > .folder > .cover:before,.container > .folder > .cover:after{box-sizing:border-box;content:"";display:block;position:absolute;top:-100px;border:50px solid transparent;}
.container > .folder > .cover:before{left:0;width:50%;border-left:none;border-bottom-color:#fab62f;}
.container > .folder > .cover:after{right:0;width:50%;border-right:none;border-bottom-color:#fab62f;}
.container > .folder > .cover > .title{position:absolute;padding:1em;font-family:Arial,Helvetica,sans-serif;text-transform:uppercase;font-weight:bold;text-align:center;font-size:2.5em;color:rgba(0,0,0,0.1);-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none;-moz-transform:rotate(20deg);-ms-transform:rotate(20deg);-o-transform:rotate(20deg);-webkit-transform:rotate(20deg);transform:rotate(20deg);}
.container > .folder > .paper{opacity:1;position:absolute;overflow:hidden;width:200px;height:200px;top:calc(50% - 150px);left:calc(50% - 100px);transition:top 0.5s,opacity 0.4s;font-family:Verdana,Tahoma,sans-serif;font-size:0.1em;padding:1em;color:#644812;background-color:#fde1ab;-moz-box-shadow:10px 10px rgba(0,0,0,0.2);-webkit-box-shadow:10px 10px rgba(0,0,0,0.2);box-shadow:10px 10px rgba(0,0,0,0.2);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;}
.container > .folder:hover > .paper{top:calc(50% - 200px);}
.container > .folder.opened > .paper{top:calc(-500px);opacity:0;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
33.95 KB
Html 动画效果1
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章