Skip to content

Instantly share code, notes, and snippets.

@AnoRebel
Created February 28, 2023 14:53
Show Gist options
  • Save AnoRebel/79ac949fba607ba49e4391a8809390e9 to your computer and use it in GitHub Desktop.
Save AnoRebel/79ac949fba607ba49e4391a8809390e9 to your computer and use it in GitHub Desktop.
A cool neumorphic loader
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #000;
}
.load {
position: relative;
width: 200px;
height: 200px;
border-radius: 50%;
background: linear-gradient(45deg, transparent,transparent 40%, #ff0);
animation: animate 1s linear infinite;
}
@keyframes animate {
0% {
transform: rotate(0);
filter: hue-rotate(0);
}
100% {
tranform: rotate(360deg);
filter: hue-rotata(90deg);
}
}
.load:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
background: #000;
border-radius: 50%;
z-index: 1000;
}
.load:after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(45deg, transparent, transparent 40%, #ff0);
border-radius: 50%;
z-index: 1000;
z-index: 1;
filter: blur(20px);
}
<div class="load" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment