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 .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0