css实现花瓣呼吸效果动画代码
代码语言:html
所属分类:动画
代码描述:css实现花瓣呼吸效果动画代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .x { grid-row: 1/-1; grid-column: 1/-1; border-radius: 12px; box-shadow: 0 0 2px rgba(0,0,0,0.1); box-shadow: 0 0 4px rgba(0,0,0,0.1); box-shadow: 0 0 6px rgba(0,0,0,0.1); box-shadow: 0 0 8px rgba(0,0,0,0.1); box-shadow: 0 0 10px rgba(0,0,0,0.1); box-shadow: 0 0 12px rgba(0,0,0,0.1); box-shadow: 0 0 14px rgba(0,0,0,0.1); box-shadow: 0 0 16px rgba(0,0,0,0.1); box-shadow: 0 0 18px rgba(0,0,0,0.1); box-shadow: 0 0 20px rgba(0,0,0,0.1); box-shadow: 0 0 22px rgba(0,0,0,0.1); box-shadow: 0 0 24px rgba(0,0,0,0.1); box-shadow: 0 0 26px rgba(0,0,0,0.1); box-shadow: 0 0 28px rgba(0,0,0,0.1); box-shadow: 0 0 30px rgba(0,0,0,0.1); box-shadow: 0 0 32px rgba(0,0,0,0.1); box-shadow: 0 0 34px rgba(0,0,0,0.1); box-shadow: 0 0 36px rgba(0,0,0,0.1); box-shadow: 0 0 38px rgba(0,0,0,0.1); box-shadow: 0 0 40px rgba(0,0,0,0.1); } .x:nth-of-type(1) { width: 4vmin; height: 4vmin; background: #ffede6; -webkit-animation: xx-1 2s 80ms ease infinite alternate; animation: xx-1 2s 80ms ease infinite alternate; -webkit-transform: perspective(490px) rotate(37deg); transform: perspective(490px) rotate(37deg); z-index: 9; } @-webkit-keyframes xx-1 { to { -webkit-transform: rotate(37deg) scale(0.6); transform: rotate(37deg) scale(0.6); } } @keyframes xx-1 { to { -webkit-transform: rotate(37deg) scale(0.6); transform: rotate(37deg) scale(0.6); } } .x:nth-of-type(2) { width: 8vmin; height: 8vmin; background: #fedacd; -webkit-animation: xx-2 2s 160ms ease infinite alternate; animation: xx-2 2s 160ms ease infinite alternate; -webkit-transform: perspective(480px) rotate(74deg); transform: perspective(480px) rotate(74deg); z-index: 8; } @-webkit-keyframes xx-2 { to { -webkit-transform: rotate(74deg) scale(0.6); transform: rotate(74deg) scale(0.6); } } @keyframes xx-2 { to { -webkit-transform: rotate(74deg) scale(0.6); transform: rotate(74deg) scale(0.6); } } .x:nth-of-type(3) { width: 12vmin; height: 12vmin; background: #fdc6b5; -webkit-animation: xx-3 2s 240ms ease infinite alternate; animation: xx-3 2s 240ms ease infinite alternate; -webkit-transform: perspective(470px) rotate(111deg); transform: perspective(470px) rotate(111deg); z-index: 7; } @-webkit-keyframes xx-3 { to { -webkit-transform: rotate(111deg) scale(0.6); transform: rotate(111deg) scale(0.6); } } @keyframes xx-3 { to { -webkit-transform: rotate(111deg) scale(0.6); transform: rotate(111deg) scale(0.6); } } .x:nth-of-type(4) { width: 16vmin; height: 16vmin; background: #fbb09d; -webkit-animation: xx-4 2s 320ms ease infinite alternate; animation: xx-4 2s 320ms ease infinite alternate; -webkit-transform: perspective(460px) rotate(148deg); transform: perspective(460px) rotate(148deg); z-index: 6; } @-webkit-keyframes xx-4 { to { -webkit-transform: rotate(148deg) scale(0.6); transform: rotate(148deg) scale(0.6); } } @keyframes xx-4 { to { -webkit-transform: rotate(148deg) scale(0.6); transform: rotate(148deg) scale(0.6); } } .x:nth-of-type(5) { width: 20vmin; height: 20vmin; background: #f99986; -webkit-animation: xx-5 2s 400ms ease infinite alternate; animation: xx-5 2s 400ms ease infinite alternate; -webkit-transform: perspective(450px) rotate(185deg); transform: perspective(450px) rotate(185deg); z-index: 5; } @-webkit-keyframes xx-5 { to { -webkit-transform: rotate(185deg) scale(0.6); transform: rotate(185deg) scale(0.6); } } @keyframes xx-5 { to { -webkit-transform: rotate(185deg) scale(0.6); transform: rotate(185deg) scale(0.6); } } .x:nth-of-type(6) { width: 24vmin; height: 24vmin; background: #f6816f; -webkit-animation: xx-6 2s 480ms ease infinite alternate; animation: xx-6 2s 480ms ease infinite alternate; -webkit-transform: perspective(440px) rotate(222deg); transform: perspective(440px) rotate(222deg); z-index: 4; } @-webkit-keyframes xx-6 { to { -webkit-transform: rotate(222deg) scale(0.6); transform: rotate(222deg) scale(0.6); } } @keyframes xx-6 { to { -webkit-transform: rotate(222deg) scale(0.6); transform: rotate(222deg) scale(0.6); } } .x:nth-of-type(7) { width: 28vmin; height: 28vmin; background: #f36859; -webkit-animation: xx-7 2s 560ms ease infinite alternate; animation: xx-7 2s 560ms ease infinite alternate; -webkit-transform: perspective(430px) rotate(259deg); transform: perspective(430px) rotate(259deg); z-index: 3; } @-webkit-keyframes xx-7 { to { -webkit-transform: rotate(259deg) scale(0.6); transform: rotate(259deg) scale(0.6); } } @keyframes xx-7 { to { -webkit-transform: rotate(259deg) scale(0.6); transform: rotate(259deg) scale(0.6); } } .x:nth-of-type(8) { width: 32vmin; height: 32vmin; background: #ef4f43; -webkit-animation: xx-8 2s 640ms ease infinite alternate; animation: xx-8 2s 640ms ease infinite alternate; -webkit-transform: perspective(420px) rotate(296deg); transform: perspective(420px) rotate(296deg); z-index: 2; } @-webkit-keyframes xx-8 { to { -webkit-transform: rotate(296deg) scale(0.6); transform: rotate(296deg) scale(0.6); } } @keyframes xx-8 { to { -webkit-transform: rotate(296deg) scale(0.6); transform: rotate(296deg) scale(0.6); } } .x:nth-of-type(9) { width: 36vmin; height: 36vmin; background: #ea342e; -webkit-animation: xx-9 2s 720ms ease infinite alternate; animation: xx-9 2s 720ms ease infinite alternate; -webkit-transform: perspective(410px) rotate(333deg); transform: perspective(410px) rotate(333deg); z-index: 1; } @-webkit-keyframes xx-9 { to { -webkit-transform: rotate(333deg) scale(0.6); transform: rotate(333deg) scale(0.6); } } @keyframes xx-9 { to { -webkit-transform: rotate(333deg) scale(0.6); transform: rotate(333deg) scale(0.6); } } .x:nth-of-type(10) { width: 40vmin; height: 40vmin; background: #e61919; -webkit-animation: xx-10 2s 800ms ease infinite alternate; animation: xx-10 2s 800ms ease infinite alternate; -webkit-transform: perspective(400px) rotate(370deg); transform: perspective(400px) rotate(370deg); z-index: 0; } @-webkit-keyframes xx-10 { to { -webkit-transform: rotate(370deg) scale(0.6); transform: rotate(370deg) scale(0.6); } } @keyframes xx-10 { to { -webkit-transform: rotate(370deg) scale(0.6); transform: rotate(370deg) scale(0.6); } } .x:nth-of-type(11) { width: 44vmin; height: 44vmin; background: #cc191f; -webkit-animation: xx-11 2s 880ms ease.........完整代码请登录后点击上方下载按钮下载查看
网友评论0