CSS Voxel Animation
How do I make an css voxel animation?
What is a css voxel animation? How do you make a css voxel animation? This script and codes were developed by Chad Scira on 27 August 2022, Saturday.
CSS Voxel Animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Voxel Animation</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ .wrap { margin-top: 10px; perspective: 2800px; perspective-origin: 50% 50%; width: 100%; height: 100%; position: relative; transform-origin: 50% 0; transform: scale(.5) translateX(-140px);
}
@media screen and ( min-height: 200px ) { .wrap { transform: scale(.6) translateX(-140px); }
}
@media screen and ( min-height: 300px ) { .wrap { transform: scale(.8) translateX(-140px); }
}
@media screen and ( min-height: 400px ) { .wrap { transform: scale(1) translateX(-140px); }
}
.cube { position: absolute; height: 200px; width: 200px; left: 0; top: 300px; bottom: 0; right: 0; margin: auto; transform-style: preserve-3d; transform: scale(.5) rotateX(-35deg) rotateY(45deg); transition: transform .2s linear 0s;
}
.cube:hover {
}
.cube div { position: absolute; width: 200px; height: 200px;
}
.cube:nth-child(4) { animation: Test 4s infinite;
}
.cube:nth-child(4) .front {
background-color: #deb631;
}
.cube:nth-child(4) .top {
background-color: #deb631;
}
.cube:nth-child(4) .left {
background-color: #deb631;
}
.cube:nth-child(1) { left: 282px;
}
.cube:nth-child(2) { transform: scale(.5) translateX(140px) translateY(245px) rotateX(-35deg) rotateY(45deg);
}
.cube:nth-child(3) { transform: scale(.5) translateX(422px) translateY(245px) rotateX(-35deg) rotateY(45deg);
}
.cube div:after { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; border: 2px solid black;
}
.left {
background-color: #f76d3f; background-image: repeating-linear-gradient(-135deg, transparent, transparent 20px, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 25px); transform: rotateY(270deg) translateX(-100px); transform-origin: center left;
}
.top { background-color: #f76d3f; transform: rotateX(-90deg) translateY(-100px); transform-origin: top center;
}
.front { background-color: #f76d3f;
background-image: repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 25px), repeating-linear-gradient(-135deg, transparent, transparent 20px, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 25px); transform: translateZ(100px);
}
@keyframes Test { 0% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(0px); } 10% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(200px); } 20% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px); } 30% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px) translateY(200px); } 40% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px); } 50% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px) translateX(200px); } 60% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px) translateX(400px); } 60.01% { z-index: 1; } 60.02% { z-index: -1; } 70% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateY(0px) translateZ(200px) translateX(400px); } 70.01% { z-index: -1; } 80% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateY(0px) translateZ(0px) translateX(400px); } 90% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateY(0px) translateZ(0px) translateX(200px); } 99.99% { z-index: -1; } 100% { z-index: 1; transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(0px); }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="wrap"> <div class="cube"> <div class="front"></div> <div class="top"></div> <div class="left"></div> </div> <div class="cube"> <div class="front"></div> <div class="top"></div> <div class="left"></div> </div> <div class="cube"> <div class="front"></div> <div class="top"></div> <div class="left"></div> </div> <div class="cube"> <div class="front"></div> <div class="top"></div> <div class="left"></div> </div>
</div>
</body>
</html>
CSS Voxel Animation - Script Codes CSS Codes
.wrap { margin-top: 10px; perspective: 2800px; perspective-origin: 50% 50%; width: 100%; height: 100%; position: relative; transform-origin: 50% 0; transform: scale(.5) translateX(-140px);
}
@media screen and ( min-height: 200px ) { .wrap { transform: scale(.6) translateX(-140px); }
}
@media screen and ( min-height: 300px ) { .wrap { transform: scale(.8) translateX(-140px); }
}
@media screen and ( min-height: 400px ) { .wrap { transform: scale(1) translateX(-140px); }
}
.cube { position: absolute; height: 200px; width: 200px; left: 0; top: 300px; bottom: 0; right: 0; margin: auto; transform-style: preserve-3d; transform: scale(.5) rotateX(-35deg) rotateY(45deg); transition: transform .2s linear 0s;
}
.cube:hover {
}
.cube div { position: absolute; width: 200px; height: 200px;
}
.cube:nth-child(4) { animation: Test 4s infinite;
}
.cube:nth-child(4) .front {
background-color: #deb631;
}
.cube:nth-child(4) .top {
background-color: #deb631;
}
.cube:nth-child(4) .left {
background-color: #deb631;
}
.cube:nth-child(1) { left: 282px;
}
.cube:nth-child(2) { transform: scale(.5) translateX(140px) translateY(245px) rotateX(-35deg) rotateY(45deg);
}
.cube:nth-child(3) { transform: scale(.5) translateX(422px) translateY(245px) rotateX(-35deg) rotateY(45deg);
}
.cube div:after { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; border: 2px solid black;
}
.left {
background-color: #f76d3f; background-image: repeating-linear-gradient(-135deg, transparent, transparent 20px, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 25px); transform: rotateY(270deg) translateX(-100px); transform-origin: center left;
}
.top { background-color: #f76d3f; transform: rotateX(-90deg) translateY(-100px); transform-origin: top center;
}
.front { background-color: #f76d3f;
background-image: repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 25px), repeating-linear-gradient(-135deg, transparent, transparent 20px, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 25px); transform: translateZ(100px);
}
@keyframes Test { 0% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(0px); } 10% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(200px); } 20% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px); } 30% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px) translateY(200px); } 40% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px); } 50% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px) translateX(200px); } 60% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(400px) translateX(400px); } 60.01% { z-index: 1; } 60.02% { z-index: -1; } 70% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateY(0px) translateZ(200px) translateX(400px); } 70.01% { z-index: -1; } 80% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateY(0px) translateZ(0px) translateX(400px); } 90% { transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateY(0px) translateZ(0px) translateX(200px); } 99.99% { z-index: -1; } 100% { z-index: 1; transform: scale(.5) rotateX(-35deg) rotateY(45deg) translateZ(0px); }
}
Developer | Chad Scira |
Username | icodeforlove |
Uploaded | August 27, 2022 |
Rating | 3.5 |
Size | 3,005 Kb |
Views | 40,480 |
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!
Name | Size |
Ripple Words | 3,081 Kb |
Live example of core distribution | 4,553 Kb |
Dippin Dots | 2,459 Kb |
A Pen by Chad Scira | 2,150 Kb |
Faces | 3,526 Kb |
FizzBuzz CAPTCHA | 2,568 Kb |
Canvas Text Vortex | 3,252 Kb |
Animated 3D Text | 3,272 Kb |
Animated rainbow wave on canvas | 2,777 Kb |
Raw Request to Requester Request | 3,112 Kb |
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!
Name | Username | Size |
Highbrow Basic HTML Lesson 7 | Kimlarocca | 1,662 Kb |
React JS Movie Info App | MTushar | 4,870 Kb |
Avero - Collectieve LVVP Arbeidsongeschiktheidsverzekering - CSS - som | Frederiquebonink | 12,554 Kb |
Image Hover | Johnheiner | 3,409 Kb |
Cake | Kennyname | 7,220 Kb |
React Recipe Box | Krokodill | 5,347 Kb |
Mostly Fluid | Mccreath | 3,308 Kb |
Vue.js Starter | Andymerskin | 1,268 Kb |
Flip test | Madhes | 1,635 Kb |
Playing with FlexBox | _Billy_Brown | 3,162 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!