D
D
Denis Bukreev2016-12-13 13:06:14
css
Denis Bukreev, 2016-12-13 13:06:14

Is it possible to implement random movement of an element in CSS using keyframes?

So it goes.
I'm trying to create a Brownian movement of several elements using keyframes, but they just move along the vector and sharply change direction at key points - there is no smoothness.
I made 10 key points with a maximum of 2px difference in transform: translate3d() between positions - poor, there is no smoothness, the element just moves along the polyline.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yaroslav Ivanov, 2016-12-13
@denisbookreev

jsdo.it/Kodai/brown
jsfiddle.net/PppZ3

D
devstudent, 2016-12-13
@devstudent

I think it will be necessary to register each pixel in the keyframes, for smoothness, perhaps with some kind of cycle, well then it’s easier in javascript

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question