85 lines
1.6 KiB
CSS
85 lines
1.6 KiB
CSS
:root {
|
|
--deg: 1;
|
|
--x: -50%;
|
|
--y: -50%;
|
|
--speed: 50ms;
|
|
}
|
|
|
|
svg {
|
|
width: 100px;
|
|
height: 100px;
|
|
/*margin: 20px;*/
|
|
display: inline-block;
|
|
}
|
|
|
|
.mydiv {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(var(--x, -50%), var(--y, -50%)) rotate(0deg);
|
|
font-size: 20vmin;
|
|
width: 100px;
|
|
height: 110px;
|
|
border-radius: 90% 95% 85% 105%;
|
|
background: #0f0;
|
|
mix-blend-mode: screen;
|
|
filter: hue-rotate(0deg);
|
|
-webkit-animation: wobble calc(var(--speed) * var(--t)) linear infinite;
|
|
animation: wobble calc(var(--speed) * var(--t)) linear infinite;
|
|
transform-origin: -var(--y) -var(--x);
|
|
box-shadow: 0 0 15px 5px #000 inset, 0 0 55px 0 #fff;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.mydiv::after {
|
|
font-size: 1em;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.mydiv:nth-child(1) {
|
|
--x: -53%;
|
|
--y: -53%;
|
|
--t: 37;
|
|
}
|
|
|
|
.mydiv:nth-child(2) {
|
|
--x: -47%;
|
|
--y: -52%;
|
|
--t: 58;
|
|
}
|
|
|
|
.mydiv:nth-child(3) {
|
|
--x: -45%;
|
|
--y: -50%;
|
|
--t: 46;
|
|
}
|
|
|
|
.mydiv:nth-child(4) {
|
|
--x: -53%;
|
|
--y: -45%;
|
|
--t: 72;
|
|
}
|
|
|
|
.mydiv:nth-child(5) {
|
|
--x: -55%;
|
|
--y: -45%;
|
|
--t: 62;
|
|
}
|
|
|
|
@-webkit-keyframes wobble {
|
|
to {
|
|
filter: hue-rotate(360deg);
|
|
transform: translate(var(--x), var(--y)) rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@keyframes wobble {
|
|
to {
|
|
filter: hue-rotate(360deg);
|
|
transform: translate(var(--x), var(--y)) rotate(360deg);
|
|
}
|
|
}
|
|
|