VOOZH about

URL: https://www.geeksforgeeks.org/web-templates/how-to-create-gradient-background-animation-using-html-and-css/

⇱ How to Create Gradient Background Animation using HTML and CSS ? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Create Gradient Background Animation using HTML and CSS ?

Last Updated : 26 Jul, 2024

Gradient animation can be added to the background of your websites by using simple HTML and CSS @keyframes rule that generate the desired animation.

HTML Code: In the following example, the basic structure of the HTML page is implemented.

CSS Code: In the following section, designing of the background is implemented using simple CSS @keyframes rule that provide the animation feature. Providing different gradient colors is done using linear-gradient() function.

Complete Code: It is the combination of the above two code sections.

Output:

Comment