V
V
Vanik Khachatryan2018-05-17 20:53:22
css
Vanik Khachatryan, 2018-05-17 20:53:22

How to make smooth movement of objects on the page?

There is a square that adds 10px to its left. When clamped, there is jerky movement, how to make a smooth smooth movement?
I use vue.js, maybe it has its own solutions? Or suggest something.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-05-18
@VaniXac

CSS transform and transition instead of straight left - will be much smoother

G
Good UI, 2018-05-17
@you_web

https://codepen.io/you_web/pen/PexjKd
On the element that will move, set the property transition: 0.5s , where 0.5s is the transformation time
Vanik Khachatryan , look again, I changed the time to 2s and it became very smooth. If this is not enough, then you can play around with this - htmlbook.ru/css/transition-timing-function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question