Build a radial gradient with the shape of a circle


To create a circle with radial gradient, you can try to run the following code. Set another parameter in radial gradient for shapes like circle

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         #demo {
            height: 400px;
            background: radial-gradient(circle, red , blue, yellow);
         }
      </style>
   </head>
   <body>
      <h2>Radial Gradient</h2>
      <div id = "demo">Radial Gradients</div><br>
   </body>
</html>

Updated on: 23-Jun-2020

174 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements