Zero-element 3d css corridor
How do I make an zero-element 3d css corridor?
No markup. What is a zero-element 3d css corridor? How do you make a zero-element 3d css corridor? This script and codes were developed by Keith Clark on 12 August 2022, Friday.
Zero-element 3d css corridor - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>zero-element 3d css corridor</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! */ html { perspective: 600px; background: rgb(10,25,10);
}
html,body { position:absolute; top:0; left:0; right:0; bottom:0; transform-style: preserve-3d;
}
html:before,
html:after,
body:before,
body:after { position: absolute; left: 50%; top: 50%; content: ""; background-size: 100% 100%, 400px 400px; animation: 2s move3 linear infinite;
}
/* ceiling */
html:before,
html:after { width: 200px; height: 1600px; margin: -800px -100px; animation: 2s move2 linear infinite;
}
/* walls */
body:before,
body:after { height: 200px; width: 1600px; margin: -100px -800px; background-image: linear-gradient(90deg, rgba(0,0,0,0), rgba(10,20,10,.75) 50%, rgba(10,25,10,1)), url(http://keithclark.co.uk/labs/css-fps/wall.jpg);
}
/* ceiling */
html:before { transform: translateY(-100px) rotateX(-90deg); background-image: linear-gradient(rgba(0,0,0,0), rgba(10,20,10,.75) 50%, rgba(10,25,10,1)), url(http://keithclark.co.uk/labs/css-fps/ceil.jpg);
}
/* floor */
html:after { transform: translateY(100px) rotateX(-90deg); background-image: linear-gradient(rgba(0,0,0,0), rgba(10,20,10,.75) 50%, rgba(10,25,10,1)), url(http://keithclark.co.uk/labs/css-fps/floor.jpg);
}
/* left wall */
body:before { transform: translateX(-100px) rotateY(90deg);
}
/* right wall */
body:after { transform: translateX(100px) rotateY(90deg);
}
body { animation: 2s move3 linear infinite;
}
html { animation: 2s move2 linear infinite, 10s move ease-in-out alternate infinite;
}
@keyframes move { from { transform: translateX(-50px) rotateY(7deg) rotateX(2deg) } to { transform: translateX(50px) rotateY(-7deg) rotateX(-4deg) rotateZ(5deg) }
}
@keyframes move2 { from { background-position: 0 0, 0 400px; } to { background-position: 0 0, 0 0; }
}
@keyframes move3 { from { background-position: 0 0, 400px 0; } to { background-position: 0 0, 0 0; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <!--
This is a work in progress
* Need to rething the z movement effect so it can be H/W accelerated
* Need to create tiling textures
* background-position z movement trick can be done with one animation
-->
</body>
</html>
Zero-element 3d css corridor - Script Codes CSS Codes
html { perspective: 600px; background: rgb(10,25,10);
}
html,body { position:absolute; top:0; left:0; right:0; bottom:0; transform-style: preserve-3d;
}
html:before,
html:after,
body:before,
body:after { position: absolute; left: 50%; top: 50%; content: ""; background-size: 100% 100%, 400px 400px; animation: 2s move3 linear infinite;
}
/* ceiling */
html:before,
html:after { width: 200px; height: 1600px; margin: -800px -100px; animation: 2s move2 linear infinite;
}
/* walls */
body:before,
body:after { height: 200px; width: 1600px; margin: -100px -800px; background-image: linear-gradient(90deg, rgba(0,0,0,0), rgba(10,20,10,.75) 50%, rgba(10,25,10,1)), url(http://keithclark.co.uk/labs/css-fps/wall.jpg);
}
/* ceiling */
html:before { transform: translateY(-100px) rotateX(-90deg); background-image: linear-gradient(rgba(0,0,0,0), rgba(10,20,10,.75) 50%, rgba(10,25,10,1)), url(http://keithclark.co.uk/labs/css-fps/ceil.jpg);
}
/* floor */
html:after { transform: translateY(100px) rotateX(-90deg); background-image: linear-gradient(rgba(0,0,0,0), rgba(10,20,10,.75) 50%, rgba(10,25,10,1)), url(http://keithclark.co.uk/labs/css-fps/floor.jpg);
}
/* left wall */
body:before { transform: translateX(-100px) rotateY(90deg);
}
/* right wall */
body:after { transform: translateX(100px) rotateY(90deg);
}
body { animation: 2s move3 linear infinite;
}
html { animation: 2s move2 linear infinite, 10s move ease-in-out alternate infinite;
}
@keyframes move { from { transform: translateX(-50px) rotateY(7deg) rotateX(2deg) } to { transform: translateX(50px) rotateY(-7deg) rotateX(-4deg) rotateZ(5deg) }
}
@keyframes move2 { from { background-position: 0 0, 0 400px; } to { background-position: 0 0, 0 0; }
}
@keyframes move3 { from { background-position: 0 0, 400px 0; } to { background-position: 0 0, 0 0; }
}
Developer | Keith Clark |
Username | keithclark |
Uploaded | August 12, 2022 |
Rating | 4.5 |
Size | 2,713 Kb |
Views | 36,432 |
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 |
Single element shaded cube | 3,171 Kb |
3D objects in CSS with shading | 3,319 Kb |
3D objects in CSS | 3,080 Kb |
Pure CSS starfield | 2,798 Kb |
One element CSS Snow | 4,066 Kb |
Pure CSS Parallax Scrolling | 3,343 Kb |
Pure CSS parallax demo | 4,855 Kb |
Single element Atari ST demo effect | 2,477 Kb |
Single element pure CSS 3D starfield | 7,338 Kb |
Using CSS custom properties for theme previews | 4,073 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 |
Marching Squares Visualized | Sakri | 7,074 Kb |
Calculator | Rzencoder | 4,572 Kb |
Replace url via jquery | Serluk | 1,429 Kb |
Shopping cart | Andiio | 6,581 Kb |
Emberjs Bootstrap Modal Carousel | Somethingkindawierd | 4,233 Kb |
CMP5-Opdracht15 | SannevanGastel | 2,733 Kb |
Weather App | Kw7oe | 3,162 Kb |
Flex Table | Simeonoff | 4,059 Kb |
Bezier Animation with straight paths | Rhernando | 2,087 Kb |
Zip Button test | Lje7462 | 1,932 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!