Penrose Triangle CSS
How do I make an penrose triangle css?
Full CSS penrose triangle. What is a penrose triangle css? How do you make a penrose triangle css? This script and codes were developed by François Chazal on 21 September 2022, Wednesday.
Penrose Triangle CSS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Penrose Triangle CSS</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <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! */ body { overflow: hidden; background-color: #fff;
}
section { position: absolute; top: 50%; left: 50%; width: 240px; height: 277.12813px; margin-top: -120px; margin-left: -130px;
}
@keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}
.penrose { position: absolute; width: 240px; height: 277.12813px; box-sizing: content-box; transform-origin: 50% 66.666666%;
}
@keyframes move { 0% { transform-origin: 50% 50%; } 40% { transform-origin: 50% 66.666666%; } 60% { transform-origin: 50% 66.666666%; } 100% { transform-origin: 50% 50%; }
}
.penrose > div { position: absolute; bottom: 0;
}
.penrose > div:nth-of-type(1) { width: 160px; height: 34.64102px; transform-origin: 0% 100%; transform: translateX(40px) rotate(-60deg) skewX(-30deg);
}
.penrose > div:nth-of-type(2) { width: 240px; height: 34.64102px; background: rgba(0, 255, 0, 0.5); transform-origin: 100% 100%; transform: translate(0) skewX(-30deg);
}
/*************************************/
.penrose:nth-child(1) { transform: rotateZ(0deg);
}
.penrose:nth-child(1) > div { animation: color1 15s ease infinite;
}
@keyframes color1 { 0% { background: white; } 50% { background: #d65c5c; } 100% { background: white; }
}
.penrose:nth-child(2) { transform: rotateZ(120deg);
}
.penrose:nth-child(2) > div { animation: color2 15s ease infinite;
}
@keyframes color2 { 0% { background: white; } 50% { background: #a32929; } 100% { background: white; }
}
.penrose:nth-child(3) { transform: rotateZ(240deg);
}
.penrose:nth-child(3) > div { animation: color3 15s ease infinite;
}
@keyframes color3 { 0% { background: white; } 50% { background: #ebadad; } 100% { background: white; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <section> <div class="penrose"> <div></div> <div></div> </div> <div class="penrose"> <div></div> <div></div> </div> <div class="penrose"> <div></div> <div></div> </div>
</section>
</body>
</html>
Penrose Triangle CSS - Script Codes CSS Codes
body { overflow: hidden; background-color: #fff;
}
section { position: absolute; top: 50%; left: 50%; width: 240px; height: 277.12813px; margin-top: -120px; margin-left: -130px;
}
@keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}
.penrose { position: absolute; width: 240px; height: 277.12813px; box-sizing: content-box; transform-origin: 50% 66.666666%;
}
@keyframes move { 0% { transform-origin: 50% 50%; } 40% { transform-origin: 50% 66.666666%; } 60% { transform-origin: 50% 66.666666%; } 100% { transform-origin: 50% 50%; }
}
.penrose > div { position: absolute; bottom: 0;
}
.penrose > div:nth-of-type(1) { width: 160px; height: 34.64102px; transform-origin: 0% 100%; transform: translateX(40px) rotate(-60deg) skewX(-30deg);
}
.penrose > div:nth-of-type(2) { width: 240px; height: 34.64102px; background: rgba(0, 255, 0, 0.5); transform-origin: 100% 100%; transform: translate(0) skewX(-30deg);
}
/*************************************/
.penrose:nth-child(1) { transform: rotateZ(0deg);
}
.penrose:nth-child(1) > div { animation: color1 15s ease infinite;
}
@keyframes color1 { 0% { background: white; } 50% { background: #d65c5c; } 100% { background: white; }
}
.penrose:nth-child(2) { transform: rotateZ(120deg);
}
.penrose:nth-child(2) > div { animation: color2 15s ease infinite;
}
@keyframes color2 { 0% { background: white; } 50% { background: #a32929; } 100% { background: white; }
}
.penrose:nth-child(3) { transform: rotateZ(240deg);
}
.penrose:nth-child(3) > div { animation: color3 15s ease infinite;
}
@keyframes color3 { 0% { background: white; } 50% { background: #ebadad; } 100% { background: white; }
}
Developer | François Chazal |
Username | fchazal |
Uploaded | September 21, 2022 |
Rating | 3 |
Size | 3,283 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 |
Hexagona | 3,420 Kb |
Ribbon Animated Effect | 5,909 Kb |
The Cube | 6,949 Kb |
Parallax Scrolling | 6,472 Kb |
HExa | 2,185 Kb |
Logo | 3,497 Kb |
Folding Panel | 6,671 Kb |
WebTechs Animated Logo | 2,503 Kb |
World | 5,903 Kb |
Obama | 223,882 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 |
Scroll to view if element partially out of view port height | ChrisMaki | 2,104 Kb |
Wikipedia Viewer | Thalpha | 4,426 Kb |
Blank Starter | Mhartington | 2,171 Kb |
Project MMetro beta | Atomicsong | 5,157 Kb |
Simple Flat Menu | Jeplaa | 2,467 Kb |
Google Fonts Sass Mixin | HugoGiraudel | 4,237 Kb |
Mapbox Directions with geolocation tracking | Pollardld | 5,827 Kb |
Responsive Advert | James_zedd | 2,354 Kb |
Process Accordion | Devilskitchen | 31,432 Kb |
Loading animation with css | Icebob | 2,947 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!