Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make gradients with CSS3
#1
Example:

<!DOCTYPE html>
<html>
<head>
  <title>Gradients Example</title>
  <style>
    /* Apply a linear gradient background to the div element */
    div {
      width: 200px;
      height: 100px;
      background-image: linear-gradient(to right, lightblue, lightgreen);
    }
  </style>
</head>
<body>
  <div>This div has a gradient background.</div>
</body>
</html>

Explanation:

CSS background-image property can be used to create gradients. In this example, a linear gradient is applied to the div element, starting with the color light blue on the left and transitioning to light green on the right.
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Messages In This Thread
How to make gradients with CSS3 - by Qomplainerz - 07-26-2023, 06:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  CSS Conic Gradients for Circular Progress Bar Qomplainerz 0 371 07-26-2023, 07:48 PM
Last Post: Qomplainerz
  CSS3 conic gradients Qomplainerz 0 348 07-26-2023, 07:26 PM
Last Post: Qomplainerz
  How to make a grid layout with CSS3 Qomplainerz 0 287 07-26-2023, 07:03 PM
Last Post: Qomplainerz
  How to make a flexbox in CSS3 Qomplainerz 0 291 07-26-2023, 07:02 PM
Last Post: Qomplainerz
  How to make animations with CSS3 Qomplainerz 0 276 07-26-2023, 07:01 PM
Last Post: Qomplainerz
  How to make transitions with CSS3 Qomplainerz 0 315 07-26-2023, 06:59 PM
Last Post: Qomplainerz
  How to make shadows with CSS3 Qomplainerz 0 264 07-26-2023, 06:58 PM
Last Post: Qomplainerz
  How to make rounded corners with CSS3 Qomplainerz 0 241 07-26-2023, 06:51 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 2 Guest(s)