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 524 07-26-2023, 07:48 PM
Last Post: Qomplainerz
  CSS3 conic gradients Qomplainerz 0 483 07-26-2023, 07:26 PM
Last Post: Qomplainerz
  How to make a grid layout with CSS3 Qomplainerz 0 420 07-26-2023, 07:03 PM
Last Post: Qomplainerz
  How to make a flexbox in CSS3 Qomplainerz 0 419 07-26-2023, 07:02 PM
Last Post: Qomplainerz
  How to make animations with CSS3 Qomplainerz 0 406 07-26-2023, 07:01 PM
Last Post: Qomplainerz
  How to make transitions with CSS3 Qomplainerz 0 443 07-26-2023, 06:59 PM
Last Post: Qomplainerz
  How to make shadows with CSS3 Qomplainerz 0 401 07-26-2023, 06:58 PM
Last Post: Qomplainerz
  How to make rounded corners with CSS3 Qomplainerz 0 367 07-26-2023, 06:51 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 1 Guest(s)