Set a radial gradient as the background image with CSS


Set a radial gradient as the background image, with radial-gradient() CSS function. You can try to run the following code to implement linear-gradient() function in CSS

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         #demo {
            height: 200px;
            background: radial-gradient(green, orange, maroon);
         }
      </style>
   </head>
   <body>
      <p>Setting background as radial gradient.</p>
      <div id = "demo"></div>
   </body>
</html>

Updated on: 25-Jun-2020

143 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements