JQuery Animate with css

 

The animate() method performs a custom animation of a set of CSS properties. With the help of this example we can make the modification on the <div> element as per our requirement.

 
 
 
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> <script> $(document).ready(function(){ $(".btn1").click(function(){ $("div").animate({ left:'500px', opacity:'0.6', height:'250px', width:'250px' }); }); }); </script> </head> <body> <button class="btn1">Animation</button><br><br> <div class="box" style="background:brown;height:100px;width:100px;position:absolute;border-radius: 133px"></div> </body> </html>
Output