Move an HTML div in a curved path


To move an HTML div in a curved path, use any of the following:

  •  CSS Transitions
  •  JavaScript (jQuery)
  •  HTML5 Canvas

Try JavaScript to make it work in every browser.

Use the animate() method. The animate() method performs a custom animation of a set of CSS properties.

The following is the syntax:

selector.animate( params, [duration, easing, callback] );

Here is the description of all the parameters used by this method

  • params − A map of CSS properties that the animation will move toward.
  • duration − This is an optional parameter representing how long the animation will run.
  • easing − This is an optional parameter representing which easing function to use for the transition.
  • callback − This is an optional parameter representing a function to call once the animation is complete.

Updated on: 28-Jan-2020

237 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements