Usage of linear-gradient() CSS function

CSSWeb DevelopmentFront End Technology

Set a linear gradient as the background image, with linear-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: linear-gradient(green, orange, maroon);
         }
      </style>
   </head>
   <body>
      <p>Setting background as linear gradient.</p>
      <div id = "demo"></div>
   </body>
</html>
raja
Published on 31-May-2018 11:48:27
Advertisements