CSS
html, body {
height: 100%;
width: 100%;
}
body {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.loader {
position: relative;
display: inline-block;
width: 100px;
height: 100px;
border-radius: 50%;
border: 2px solid rgba(0, 0, 0, 0.25);
}
.loader:after {
content: '';
position: absolute;
top: -2px;
right: -2px;
bottom: -2px;
left: -2px;
border-radius: 50%;
border: 2px solid #F15A5A;
border-top-color: transparent;
-webkit-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
tranform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
tranform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
tranform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
tranform: rotate(360deg);
}
}