CSS3 Multi color Gradients


You can try to run the following code to implement multi-color gradients in CSS3 −

Example

Live Demo

<html>
   <head>
      <style>
         #grad2 {
            height: 100px;
            background: -webkit-linear-gradient(red, orange, yellow, red, blue, green,pink);
            background: -o-linear-gradient(red, orange, yellow, red, blue, green,pink);
            background: -moz-linear-gradient(red, orange, yellow, red, blue, green,pink);
            background: linear-gradient(red, orange, yellow, red, blue, green,pink);
         }
      </style>
   </head>
   <body>
      <div id = "grad2"></div>
   </body>
</html>

Updated on: 29-Jun-2020

141 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements