- Dapatkan pautan
- X
- E-mel
- Apl Lain
Demo
HTML view ▼
<div class="labu">
<div class="labi">
<div class="laman"></div>
<div class="ituu">
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
</div>
</div>
</div>
<style>
.labu *, .labu *::before, .labu *::after {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
}
.labu {
background-color: #000;
min-height: 100vh;
display: grid;
place-items: center;
perspective: 1200px;
overflow: hidden;
}
.labu *:not(:empty) {
transform-style: preserve-3d;
}
.labi {
position: relative;
-webkit-animation: putar 90s infinite linear;
animation: putar 90s infinite linear;
}
@-webkit-keyframes putar {
from {
transform: rotateX(60deg) rotateZ(-210deg);
}
to {
transform: rotateX(60deg) rotateZ(150deg);
}
}
@keyframes putar {
from {
transform: rotateX(60deg) rotateZ(-210deg);
}
to {
transform: rotateX(60deg) rotateZ(150deg);
}
}
.laman {
position: absolute;
inset: -40em;
background-image: radial-gradient(circle, transparent, #000 40em), repeating-conic-gradient(#567 0 35deg, #678 0 55deg, #789 0 90deg);
background-size: 100% 100%, 4.5em 4.5em;
transform: translateZ(-2px);
-webkit-animation: glaman 1.5s infinite linear;
animation: glaman 1.5s infinite linear;
}
@-webkit-keyframes glaman {
to {
background-position-x: center, -4.5em;
}
}
@keyframes glaman {
to {
background-position-x: center, -4.5em;
}
}
.ituu {
position: absolute;
display: flex;
gap: 0.5em;
transform: translateX(-50%);
}
.lak {
width: 3em;
height: 2em;
-webkit-animation: cubacuba 2s var(--delay, 0s) infinite ease-in-out;
animation: cubacuba 2s var(--delay, 0s) infinite ease-in-out;
}
.lak > div {
position: absolute;
inset: 0;
-webkit-animation: cubale 2s var(--delay, 0s) infinite ease-in-out;
animation: cubale 2s var(--delay, 0s) infinite ease-in-out;
}
.lak > div > div {
position: absolute;
inset: 0;
background-color: #789;
box-shadow: 0 0 1em #0008 inset;
transform-style: preserve-3d;
-webkit-animation: cuba 2s var(--delay, 0s) infinite ease-in-out;
animation: cuba 2s var(--delay, 0s) infinite ease-in-out;
}
.lak > div > div::before, .lak > div > div::after {
content: "";
position: absolute;
inset: 0;
box-shadow: 0 0 1em #0008 inset;
}
.lak > div > div::before {
background-image: linear-gradient(#789, #def);
transform: rotatex(60deg);
transform-origin: top;
}
.lak > div > div::after {
background-image: linear-gradient(#def, #789);
transform: rotatex(-60deg);
transform-origin: bottom;
}
@-webkit-keyframes cubale {
0%, 50%, 100% {
transform: translateZ(0em);
}
25% {
transform: translateZ(6em);
}
}
@keyframes cubale {
0%, 50%, 100% {
transform: translateZ(0em);
}
25% {
transform: translateZ(6em);
}
}
@-webkit-keyframes cubacuba {
0%, 100% {
transform: translateX(0em);
}
50% {
transform: translateX(3em);
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
}
}
@keyframes cubacuba {
0%, 100% {
transform: translateX(0em);
}
50% {
transform: translateX(3em);
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
}
}
@-webkit-keyframes cuba {
0%, 50%, 100% {
transform: rotateY(0deg);
}
12.5% {
transform: rotateY(45deg);
}
37.5% {
transform: rotateY(-45deg);
}
}
@keyframes cuba {
0%, 50%, 100% {
transform: rotateY(0deg);
}
12.5% {
transform: rotateY(45deg);
}
37.5% {
transform: rotateY(-45deg);
}
}
.lak:nth-child(1) {
--delay: -2s ;
}
.lak:nth-child(2) {
--delay: -1.8666666667s ;
}
.lak:nth-child(3) {
--delay: -1.7333333333s ;
}
.lak:nth-child(4) {
--delay: -1.6s ;
}
.lak:nth-child(5) {
--delay: -1.4666666667s ;
}
.lak:nth-child(6) {
--delay: -1.3333333333s ;
}
.lak:nth-child(7) {
--delay: -1.2s ;
}
.lak:nth-child(8) {
--delay: -1.0666666667s ;
}
.lak:nth-child(9) {
--delay: -0.9333333333s ;
}
.lak::after {
content: "";
position: absolute;
inset: 0;
background-color: #000;
filter: blur(0.75em);
transform: scale(1.1) translateZ(-1px);
-webkit-animation: byg 2s var(--delay, 0s) infinite ease-in-out;
animation: byg 2s var(--delay, 0s) infinite ease-in-out;
}
@-webkit-keyframes byg {
0%, 50%, 100% {
opacity: 0.8;
transform: scale(1.1) translateZ(-1px);
}
25% {
opacity: 0.2;
transform: scale(2) translateZ(-1px);
}
}
@keyframes byg {
0%, 50%, 100% {
opacity: 0.8;
transform: scale(1.1) translateZ(-1px);
}
25% {
opacity: 0.2;
transform: scale(2) translateZ(-1px);
}
}
</style>
<div class="labi">
<div class="laman"></div>
<div class="ituu">
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
<div class="lak">
<div>
<div></div>
</div>
</div>
</div>
</div>
</div>
<style>
.labu *, .labu *::before, .labu *::after {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
}
.labu {
background-color: #000;
min-height: 100vh;
display: grid;
place-items: center;
perspective: 1200px;
overflow: hidden;
}
.labu *:not(:empty) {
transform-style: preserve-3d;
}
.labi {
position: relative;
-webkit-animation: putar 90s infinite linear;
animation: putar 90s infinite linear;
}
@-webkit-keyframes putar {
from {
transform: rotateX(60deg) rotateZ(-210deg);
}
to {
transform: rotateX(60deg) rotateZ(150deg);
}
}
@keyframes putar {
from {
transform: rotateX(60deg) rotateZ(-210deg);
}
to {
transform: rotateX(60deg) rotateZ(150deg);
}
}
.laman {
position: absolute;
inset: -40em;
background-image: radial-gradient(circle, transparent, #000 40em), repeating-conic-gradient(#567 0 35deg, #678 0 55deg, #789 0 90deg);
background-size: 100% 100%, 4.5em 4.5em;
transform: translateZ(-2px);
-webkit-animation: glaman 1.5s infinite linear;
animation: glaman 1.5s infinite linear;
}
@-webkit-keyframes glaman {
to {
background-position-x: center, -4.5em;
}
}
@keyframes glaman {
to {
background-position-x: center, -4.5em;
}
}
.ituu {
position: absolute;
display: flex;
gap: 0.5em;
transform: translateX(-50%);
}
.lak {
width: 3em;
height: 2em;
-webkit-animation: cubacuba 2s var(--delay, 0s) infinite ease-in-out;
animation: cubacuba 2s var(--delay, 0s) infinite ease-in-out;
}
.lak > div {
position: absolute;
inset: 0;
-webkit-animation: cubale 2s var(--delay, 0s) infinite ease-in-out;
animation: cubale 2s var(--delay, 0s) infinite ease-in-out;
}
.lak > div > div {
position: absolute;
inset: 0;
background-color: #789;
box-shadow: 0 0 1em #0008 inset;
transform-style: preserve-3d;
-webkit-animation: cuba 2s var(--delay, 0s) infinite ease-in-out;
animation: cuba 2s var(--delay, 0s) infinite ease-in-out;
}
.lak > div > div::before, .lak > div > div::after {
content: "";
position: absolute;
inset: 0;
box-shadow: 0 0 1em #0008 inset;
}
.lak > div > div::before {
background-image: linear-gradient(#789, #def);
transform: rotatex(60deg);
transform-origin: top;
}
.lak > div > div::after {
background-image: linear-gradient(#def, #789);
transform: rotatex(-60deg);
transform-origin: bottom;
}
@-webkit-keyframes cubale {
0%, 50%, 100% {
transform: translateZ(0em);
}
25% {
transform: translateZ(6em);
}
}
@keyframes cubale {
0%, 50%, 100% {
transform: translateZ(0em);
}
25% {
transform: translateZ(6em);
}
}
@-webkit-keyframes cubacuba {
0%, 100% {
transform: translateX(0em);
}
50% {
transform: translateX(3em);
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
}
}
@keyframes cubacuba {
0%, 100% {
transform: translateX(0em);
}
50% {
transform: translateX(3em);
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
}
}
@-webkit-keyframes cuba {
0%, 50%, 100% {
transform: rotateY(0deg);
}
12.5% {
transform: rotateY(45deg);
}
37.5% {
transform: rotateY(-45deg);
}
}
@keyframes cuba {
0%, 50%, 100% {
transform: rotateY(0deg);
}
12.5% {
transform: rotateY(45deg);
}
37.5% {
transform: rotateY(-45deg);
}
}
.lak:nth-child(1) {
--delay: -2s ;
}
.lak:nth-child(2) {
--delay: -1.8666666667s ;
}
.lak:nth-child(3) {
--delay: -1.7333333333s ;
}
.lak:nth-child(4) {
--delay: -1.6s ;
}
.lak:nth-child(5) {
--delay: -1.4666666667s ;
}
.lak:nth-child(6) {
--delay: -1.3333333333s ;
}
.lak:nth-child(7) {
--delay: -1.2s ;
}
.lak:nth-child(8) {
--delay: -1.0666666667s ;
}
.lak:nth-child(9) {
--delay: -0.9333333333s ;
}
.lak::after {
content: "";
position: absolute;
inset: 0;
background-color: #000;
filter: blur(0.75em);
transform: scale(1.1) translateZ(-1px);
-webkit-animation: byg 2s var(--delay, 0s) infinite ease-in-out;
animation: byg 2s var(--delay, 0s) infinite ease-in-out;
}
@-webkit-keyframes byg {
0%, 50%, 100% {
opacity: 0.8;
transform: scale(1.1) translateZ(-1px);
}
25% {
opacity: 0.2;
transform: scale(2) translateZ(-1px);
}
}
@keyframes byg {
0%, 50%, 100% {
opacity: 0.8;
transform: scale(1.1) translateZ(-1px);
}
25% {
opacity: 0.2;
transform: scale(2) translateZ(-1px);
}
}
</style>
Rujukan CSS di codepen.io/amit_sheen/pen/NWLXXdp
Ulasan