<div id="particle-container">
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
<div class="particle"></div>
</div>
@keyframes rotatee {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
#particle-container {
animation: rotatee 50s linear infinite;
transform-origin: center center;
height: 500px;
width: 500px;
margin: auto;
overflow: hidden;
}
.particle {
position: absolute;
border-radius: 10px;
}
@for $i from 1 through 60 {
@keyframes particle-animation-#{$i} {
100% {
transform: translate3d((random(90) * 1vw), (random(90) * 1vh), (random(100) * 1px));
}
}
.particle:nth-child(#{$i}){
animation: particle-animation-#{$i} 60s infinite;
$size: random(10) + 5 + px;
opacity: random(100)/100;
height: $size;
width: $size;
animation-delay: -$i * .2s;
transform: translate3d((random(90) * 1vw), (random(90) * 1vh), (random(100) * 1px));
background: #f04c23;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.