9
I’m willing to put one loader
animated in CSS with @keyframes
on a page, but I would like to put a "drag effect" on it as if it gave a "blur" with a trace of Blur following the element when it moves...
Like this picture
But I only got so far... Does anyone have any hint or know a technique of how to get something similar to this?
.box {
position: absolute;
left: 50%;
width: 400px;
height: 200px;
margin-left: -200px;
overflow: hidden;
background: #333;
}
.bola {
position: absolute;
width: 50px;
height: 50px;
top: 75px;
left: 175px;
background: #999;
border-radius: 50%;
-webkit-animation: bolax 2s ease-in-out infinite;
animation: bolax 2s ease-in-out infinite;
}
@keyframes bolax {
0%, 100% {
-webkit-transform: translateX(-150px);
transform: translateX(-150px);
}
50% {
-webkit-transform: translateX(150px);
transform: translateX(150px);
}
}
<div class="box">
<div class="bola">
</div>
</div>
As far as I know, it is not possible to do this effect only with CSS, the ideal would be to use the canvas. Here are two examples: <p>https://codepen.io/Tyriar/pen/BfizE <p>https://codepen.io/depy/pen/amoXGB
– Gustavo Fournier