Challenge: Falling Circle

Can you make a circle that will change color when it touches the base of the SVG canvas?

Problem statement

The tasks in this challenge are as follows:

  • Draw a canvas of size 500 x 500.
  • Draw a circle of radius (r=50) with the origin at (250,50).
  • The circle should transition to the bottom of the canvas and stop there.
  • The circle should change its color from black to green when it touches the base of the SVG canvas.
  • The transition time between the falling of the circle and the changing of the color when it touches the base should be 3000 ms.

Expected output

Get hands-on with 1200+ tech skills courses.