CSS Element randomnly moving
by fparent
CSS
@keyframes moving2{
0%,
100%{
transform: translate(calc(-50% + #{random(20) - 10px}), calc(-50% + #{random(20) - 10px}))
}
@for $i from 1 to 9 {
#{$i * 10 + %} {
transform: translate(calc(-50% + #{random(20) - 10px}), calc(-50% + #{random(30) - 15px}))
}
}
}