纯css实现飞舞的纸张动画效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> - ➰📃 Paper Pirouette | 3D CSS-only flying page animation tutorial | @keyframers 2.18.0</title>
<link rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/normalize.min.css" />
<style>
*, *:before, *:after {
box-sizing: border-box;
position: relative;
}
* {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
:root {
--duration: 3.2s;
--stagger: .65s;
--easing: cubic-bezier(.36,.07,.25,1);
--offscreen: 130vmax;
--color-bg: #EF735A;
--color-blue: #384969;
--color-shadow: #211842;
}
html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
overflow: hidden;
}
body {
display: flex;
justify-content: center;
align-items: center;
background: var(--color-bg);
}
#app {
height: 70vmin;
width: 40vmin;
display: flex;
justify-content: center;
align-items: center;
-webkit-transform: translateX(25vw) rotateX(-20deg) rotateY(-55deg);
transform: translateX(25vw) rotateX(-20deg) rotateY(-55deg);
background: var(--color-blue);
border-radius: 2vmin;
-webkit-perspective: 10000px;
perspective: 10000px;
}
#app:before {
border: 10vmin solid white;
border-left-width: 2vmin;
border-right-width: 2vmin;
border-radius: inherit;
content: '';
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
border: 10vmin solid white;
border-left-width: 2vmin;
border-right-width: 2vmin;
back.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0