Press "Run code snippet" below to see the animated loading spinner that I want to save.
I want to replace all green colors with transparency.
Also, I'd like the animation to loop perfectly.
I tried recording a screen capture video using OBS and then uploading to https://ezgif.com/video-to-gif and using the "Replace color with transparency" feature, but it didn't remove any green color at all.
Also, if exporting canvas animations is easier than capturing CSS animations, I'd accept an answer that shows me how.
body {
display: flex;
overflow: hidden;
height: 100vf;
padding: 0;
margin: 0;
background-color: #090;
}
.container {
background-color: #0c0;
height: 500px;
width: 500px;
}
.sym {
position: relative;
width: 100px;
height: 100px;
border-radius: 50%;
background: linear-gradient(white 50%, black 0);
animation: r 8s linear infinite;
}
.sym:before, .sym:after {
--i: 0;
position: absolute;
top: 25%;
right: calc((1 - var(--i))*50%);
bottom: 25%;
left: calc(var(--i)*50%);
border: solid 16.6666666667px hsl(0, 0%, calc(var(--i)*100%));
transform-origin: calc(var(--i)*100%) 50%;
transform: scale(0.5);
background: hsl(0, 0%, calc((1 - var(--i))*100%));
border-radius: 50%;
animation: s 4s ease-in-out calc(var(--i)*-4s) infinite alternate;
content: '';
}
.sym:after {
--i: 1;
}
@keyframes s {
to {
transform: scale(1.5);
}
}
@keyframes r {
to {
transform: rotate(1turn);
}
}
/* from https://codepen.io/thebabydino/pen/aJPMre/ */
<body>
<div class='container'>
<div class='sym'></div>
</div>
</body>