Yin-Yang CSS Image Animation
How do I make an yin-yang css image animation?
Read the blog post http://zachsaucier.com/blog/blog/2014/06/20/the-creative-process/A CSS version based on these gifs https://24.media.tumblr.com/0a0a8f7afd396c73e3ac876fae047889/tumblr_n73sr9y6TP1relaado1_400.gif https://38.media.tumblr.com/569d680e7d50c3a9c197ab233f8e34a8/tumblr_n73pcoi2iH1relaado1_400.gif https://24.media.tumblr.com/f04bde43e138a3f9a345b2554c780d9e/tumblr_n73qa5iVsO1relaado1_400.gif https://31.media.tumblr.com/2e635a83096a4bf9dad3a011a127abf9/tumblr_n73sazxyaO1relaado1_400.gif. What is a yin-yang css image animation? How do you make a yin-yang css image animation? This script and codes were developed by Zach Saucier on 20 August 2022, Saturday.
Yin-Yang CSS Image Animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Yin-Yang CSS Image 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! */ body { background:#34495e; }
.container { width:300px; height:300px; position:relative; margin:50px auto; overflow:hidden; /* Removing this is interesting */ animation:rotate 5s linear infinite; border:1px solid black;
}
.circle { border-radius:50%; }
.one:after, .two:after { animation:rotate 2.5s linear infinite reverse; }
/* You can replace the images with anything, including gifs! */
.one:after { background-image: url(http://img2.timeinc.net/people/i/2013/pets/news/130304/kitten-3-600.jpg); }
.two:after { background-image: url(http://www.wallpapersdb.org/wallpapers/cats/cute_cat_praying_1920x1200.jpg); }
.main { width:100%; height:50%;
}
.main.two { top:50%; }
.one { transform:rotate(0deg); }
.two { transform:rotate(180deg); }
.main, .big, .small { position:absolute; overflow:hidden; }
.main:after, .big:after, .small:after { content:''; position:absolute; top:0; left:0; width:300px; height:300px; background-size:100% 100%;
}
.big { width:50%; height:50%; top:25%; left:50%;
}
.big.two { left:0; }
.big:after { top: -50%; left: -100%; }
.small { width:25%; height:25%; top:37.5%; left:12.5%;
}
.small.two { left:62.5%; }
.small:after { top: -150%; left: -50%; }
@keyframes rotate { to { transform:rotate(360deg); }
}
h2 { max-width:400px; margin:150px auto; color:darkgrey; text-align:center;
}
a { color:white;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="container circle"> <div class="main one"></div> <div class="main two"></div> <div class="big circle one"></div> <div class="big circle two"></div> <div class="small circle one"></div> <div class="small circle two"></div>
</div>
<h2>If you liked it, check out the <a href="http://zachsaucier.com/blog/blog/2014/06/20/the-creative-process/">accompanying blog post</a></h2> <script src="js/index.js"></script>
</body>
</html>
Yin-Yang CSS Image Animation - Script Codes CSS Codes
body { background:#34495e; }
.container { width:300px; height:300px; position:relative; margin:50px auto; overflow:hidden; /* Removing this is interesting */ animation:rotate 5s linear infinite; border:1px solid black;
}
.circle { border-radius:50%; }
.one:after, .two:after { animation:rotate 2.5s linear infinite reverse; }
/* You can replace the images with anything, including gifs! */
.one:after { background-image: url(http://img2.timeinc.net/people/i/2013/pets/news/130304/kitten-3-600.jpg); }
.two:after { background-image: url(http://www.wallpapersdb.org/wallpapers/cats/cute_cat_praying_1920x1200.jpg); }
.main { width:100%; height:50%;
}
.main.two { top:50%; }
.one { transform:rotate(0deg); }
.two { transform:rotate(180deg); }
.main, .big, .small { position:absolute; overflow:hidden; }
.main:after, .big:after, .small:after { content:''; position:absolute; top:0; left:0; width:300px; height:300px; background-size:100% 100%;
}
.big { width:50%; height:50%; top:25%; left:50%;
}
.big.two { left:0; }
.big:after { top: -50%; left: -100%; }
.small { width:25%; height:25%; top:37.5%; left:12.5%;
}
.small.two { left:62.5%; }
.small:after { top: -150%; left: -50%; }
@keyframes rotate { to { transform:rotate(360deg); }
}
h2 { max-width:400px; margin:150px auto; color:darkgrey; text-align:center;
}
a { color:white;
}
Yin-Yang CSS Image Animation - Script Codes JS Codes
// For more check out zachsaucier.com
Developer | Zach Saucier |
Username | Zeaklous |
Uploaded | August 20, 2022 |
Rating | 4.5 |
Size | 3,255 Kb |
Views | 38,456 |
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 |
Change transformation-origin mid animation | 2,138 Kb |
Single Element gif Recreation | 4,044 Kb |
Simple, flat contact form | 2,719 Kb |
Responsive CSS bars | 3,137 Kb |
SVG border animation 2 | 3,307 Kb |
SVG clip path with blend mode | 8,886 Kb |
CSS-Only Full Page Slider | 4,161 Kb |
Swirling dots | 6,415 Kb |
Reversing CSS Rotation Smoothly on Hover | 2,045 Kb |
Circular Questionnaire | 5,141 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 |
Drifting Clouds | Benedikte | 2,247 Kb |
CSS Gem Badge | Orchard | 3,335 Kb |
Geildanke typography | Fischaela | 3,249 Kb |
Pure CSS Animated Photo Stack | Depthdev | 2,486 Kb |
CSS Patterns | Alyda | 3,953 Kb |
Display properties | Hamzaerbay | 1,886 Kb |
Google Chrome Icon using Pure CSS in one DIV | Grssam | 3,627 Kb |
CSS Hover Effects | Alen | 3,613 Kb |
A Pen by Mike Otis | Mikeotis | 3,185 Kb |
A Pen by boilzzz | Boilzzz | 2,761 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!