Created
May 13, 2022 13:23
-
-
Save remylagerweij/05b3d3f0c98db726cc76a26b11c8e7bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* needs some finalisation for implementation, but basicly accepts 2 divs, .spinner-wrapper with the .spinner chile within it. */ | |
.spinner-wrapper{ | |
&::before{ | |
content:""; | |
position:absolute; | |
background:linear-gradient(112deg, #9894c8, #373570); | |
width:300px; | |
height:300px; | |
left:50%; | |
top:50%; | |
transform:translate(-50%, -50%); | |
} | |
} | |
.spinner{ | |
display:flex; | |
align-items:center; | |
justify-content:center; | |
min-height:100vh; | |
position: relative; | |
background:white; | |
filter: blur(12px) contrast(18); | |
mix-blend-mode: screen; | |
} | |
.spinner:before, .spinner:after{ | |
width:60px; | |
height:60px; | |
border-radius:100%; | |
background-color:#000; | |
content: ""; | |
position: absolute; | |
} | |
.spinner:before{ | |
animation: spinLeft 2s ease-in-out infinite; | |
} | |
.spinner:after{ | |
animation: spinRight 2s ease-in-out infinite; | |
} | |
@keyframes spinLeft{ | |
from{ | |
transform: rotate(0deg) translate(50px); | |
} | |
to{ | |
transform: rotate(360deg) translate(50px); | |
} | |
} | |
@keyframes spinRight{ | |
from{ | |
transform: rotate(360deg) translate(-50px); | |
} | |
to{ | |
transform: rotate(0deg) translate(-50px); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment