Loader Animation | HTML CSS

preview_player
Показать описание
#shorts #short #html #css #tutorials #trending

Sound effects from Pixabay.
Рекомендации по теме
Комментарии
Автор

Amazing! I have practiced and made as it is.

mdashif-ozgp
Автор

<!DOCTYPE html>
<html lang="en">
<head>
<title>Loader Animation</title>

<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body{
--bg-color: radial-gradient(#003, #000);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-color);
}

.box{
position: relative;
width: 500px;
height: 500px;
display: flex;
justify-content: center;
}
.box span {
position: absolute;
width: 10px;
height: 250px;
background: transparent;
border-bottom: 40px solid transparent;
transform-origin: bottom;
transform: rotate(calc(22.5deg * var(--i)));
}
.box span::before{
content: "";
position: absolute;
width: 100%;
height: 50px;
background: #0af;
box-shadow: 0 0 20px #0af;
border-radius: 10px;
animation: animate 1.5s linear infinite;
animation-delay: calc(0.1s * var(--i));
}
@keyframes animate {
0% {
transform: translateY(160px) rotate(-45deg);
filter: hue-rotate(0deg);
}
50% {
transform: translateY(90px);
}
100% {
transform: translateY(160px) rotate(45deg);
filter: hue-rotate(360deg);
}
}

</style>
</head>
<body>
<div class="box">
<span style="--i:0;"></span>
<span style="--i:1;"></span>
<span style="--i:2;"></span>
<span style="--i:3;"></span>
<span style="--i:4;"></span>
<span style="--i:5;"></span>
<span style="--i:6;"></span>
<span style="--i:7;"></span>
<span style="--i:8;"></span>
<span style="--i:9;"></span>
<span style="--i:10;"></span>
<span style="--i:11;"></span>
<span style="--i:12;"></span>
<span style="--i:13;"></span>
<span style="--i:14;"></span>
<span style="--i:15;"></span>
</div>
</body>

</html>

mdashif-ozgp