css扇形旋转扩大动画效果代码
代码语言:html
所属分类:动画
代码描述:css扇形旋转扩大动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
display: flex;
height: 100vh;
justify-content: center;
align-items: center;
background: #b3e5fc;
}
.mawaru {
position: relative;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.mawaru .circle {
position: absolute;
background: conic-gradient(var(--color1) var(--pos), var(--color2) 0);
border-radius: 50%;
}
.mawaru .circle:nth-child(1) {
--color1: #50514F;
z-index: 7;
width: 4em;
height: 4em;
animation: pos 0.6s linear, color1 1.2s step-end, color2-1 1.2s step-end;
animation-iteration-count: 2;
animation-delay: 0.4s;
}
@keyframes color2-1 {
50% {
--color2: #50514F;
}
}
.mawaru .circle:nth-child(2) {
--color1: #F25F5C;
z-index: 6;
width: 8em;
height: 8em;
animation: pos 0.6s linear, color1 1.2s step-end, color2-2 1.2s step-end;
animation-iteration-count: 2;
animation-delay: 0.8s;
}
@keyframes color2-2 {
50% {
--color2: #F25F5C;
}
}
.mawaru .circle:nth-child(3) {
--color1: #FFE066;
z-index: 5;
width: 12em;
height: 12em;
animation: pos 0.6s linear, color1 1.2s step-end, color2-3 1.2s step-end;
animation-iteration-count: 2;
animation-delay: 1.2s;
}
@keyframes.........完整代码请登录后点击上方下载按钮下载查看
网友评论0