CSS Jenga Loading Animation

Size
2,932 Kb
Views
82,984

How do I make an css jenga loading animation?

What is a css jenga loading animation? How do you make a css jenga loading animation? This script and codes were developed by Quincy Soeliman on 22 July 2022, Friday.

CSS Jenga Loading Animation Previews

CSS Jenga Loading Animation - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Jenga Loading Animation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="loader"> <div class="jenga"> <div class="row top-row"> <div class="wood block block-large"></div> </div> <div class="row middle-row"> <div class="variant-1 block block-small"></div> <div class="variant-2 block block-small"></div> <div class="variant-3 block block-small"></div> </div> <div class="row bottom-row"> <div class="wood block block-large"></div> </div> </div>
</div>
</body>
</html>

CSS Jenga Loading Animation - Script Codes CSS Codes

html,
body { margin: 0; padding: 0; min-height: 100%; height: 100%;
}
body { display: flex; justify-content: center; align-items: center;
}
.loader { display: flex; justify-content: center; align-items: center;
}
.jenga { position: relative; display: block; width: 120px; height: 100px; animation: jenga 5s ease-in-out infinite;
}
.jenga .row .block { position: absolute; border-radius: 3px;
}
.jenga .top-row .block { top: 25px; left: 0; animation: top-block 5s ease-in-out infinite;
}
.jenga .middle-row .block { top: 50px;
}
.jenga .middle-row .block:first-child { left: 0; animation: left-middle-block 5s ease-in-out infinite;
}
.jenga .middle-row .block:nth-child(2) { left: 40px; animation: middle-middle-block 5s ease-in-out infinite;
}
.jenga .middle-row .block:last-child { left: 80px; animation: right-middle-block 5s ease-in-out infinite;
}
.jenga .bottom-row .block { top: 75px; animation: bottom-block 5s ease-in-out infinite;
}
.jenga .block { display: block; height: 25px;
}
.jenga .block-small { width: 40px;
}
.jenga .block-large { width: 120px;
}
.jenga .block.wood { background-color: #ecdab0;
}
.jenga .block.variant-1 { background-color: #064aa2;
}
.jenga .block.variant-2 { background-color: #fe8919;
}
.jenga .block.variant-3 { background-color: #e7d100;
}
@keyframes top-block { 0% { top: 25px; } 40% { top: 25px; } 50% { top: 50px; } 80% { top: 50px; } 90% { top: 75px; } 100% { top: 75px; }
}
@keyframes left-middle-block { 0% { left: 0; } 10% { top: 50px; left: -40px; } 20% { top: 0; left: -40px; } 30% { left: 0; } 40% { top: 0; } 50% { top: 25px; } 80% { top: 25px; } 90% { top: 50px; } 100% { top: 50px; }
}
@keyframes right-middle-block { 0% { left: 80px; } 10% { top: 50px; left: 120px; } 20% { top: 0; left: 120px; } 30% { left: 80px; } 40% { top: 0; } 50% { top: 25px; } 80% { top: 25px; } 90% { top: 50px; } 100% { top: 50px; }
}
@keyframes middle-middle-block { 30% { left: 40px; } 40% { top: 50px; left: 120px; } 50% { top: 0; left: 120px; } 60% { top: 0; left: 40px; } 70% { top: 25px; left: 40px; } 80% { top: 25px; left: 40px; } 90% { top: 50px; } 100% { top: 50px; }
}
@keyframes bottom-block { 70% { top: 75px; left: 0; } 80% { top: 75px; left: -120px; } 90% { top: 25px; left: -120px; } 100% { top: 25px; left: 0; }
}
@keyframes jenga { 0% { margin-top: -12.5px; } 10% { margin-top: -12.5px; } 20% { margin-top: 0; } 30% { margin-top: 0; } 60% { margin-top: 0; } 70% { margin-top: -12.5px; } 100% { margin-top: -12.5px; }
}
CSS Jenga Loading Animation - Script Codes
CSS Jenga Loading Animation - Script Codes
Home Page Home
Developer Quincy Soeliman
Username quincysoeliman
Uploaded July 22, 2022
Rating 3
Size 2,932 Kb
Views 82,984
Do you need developer help for CSS Jenga Loading Animation?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Quincy Soeliman (quincysoeliman) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!