$unit: 8px;
$black-1: #222;
* {
box-sizing: border-box;
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
color: inherit;
outline: none;
font-weight: inherit;
font-size: 1em;
}
.party {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: $unit * 6;
height: $unit * 6;
&:before {
content: "";
border-right: $unit * 3 solid transparent;
border-bottom: $unit * 3 solid #B4B4F3;
border-left: $unit * 3 solid transparent;
width: $unit * 6;
height: $unit * 6;
animation: party-body .5s linear infinite;
}
ul {
width: $unit * 4;
height: $unit * 4;
border-radius: 50%;
background: #7272E9;
position: absolute;
left: $unit;
top: 0;
animation: party-head .5s linear infinite;
li:nth-child(1), li:nth-child(2) {
background: $black-1;
border-radius: 50%;
width: $unit * .75;
height: $unit * .75;
position: absolute;
top: $unit;
}
li:nth-child(1) { right: $unit / 2; }
li:nth-child(2) { left: $unit; }
li:nth-child(3) {
border-left: $unit * .5 solid transparent;
border-top: $unit * 2 solid #F5D875;
border-right: $unit * .5 solid transparent;
width: 0;
height: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translateY(-50%);
}
li:nth-child(4) {
border-top: $unit * .75 solid transparent;
border-left: $unit * .75 solid #3DF2C2;
border-bottom: $unit * .75 solid transparent;
width: 0;
height: 0;
position: absolute;
top: 0;
left: 50%;
transform: translateY(-50%);
animation: party-plume .5s linear infinite;
}
}
}
@keyframes party-body {
0%, 100% { border-bottom-color: #B4B4F3; }
25% { border-bottom-color: #70EEFA; }
50% { border-bottom-color: #A7F9E3; }
75% { border-bottom-color: #FF6270; }
}
@keyframes party-head {
0%, 100% {
transform: translate(0%, 0%) rotate(0deg);
background: #7272E9;
}
25% {
transform: translate(-37.5%, 12.5%) rotate(22.5deg);
background: #51CFDB;
}
50% {
transform: translate(0%, 25%);
background: #3AD4AC;
}
75% {
transform: translate(25%, 12.5%) rotate(-11.25deg);
background: #E04351;
}
}
@keyframes party-plume {
0%, 100% { border-left-color: #3DF2C2; }
25% { border-left-color: #7272E9; }
50% { border-left-color: #FF479E; }
75% { border-left-color: #FF8C62; }
}