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


Possibly Related Threads…
Thread Author Replies Views Last Post
  CSS Conic Gradients for Circular Progress Bar Qomplainerz 0 372 07-26-2023, 07:48 PM
Last Post: Qomplainerz
  CSS3 conic gradients Qomplainerz 0 350 07-26-2023, 07:26 PM
Last Post: Qomplainerz
  How to make a grid layout with CSS3 Qomplainerz 0 290 07-26-2023, 07:03 PM
Last Post: Qomplainerz
  How to make a flexbox in CSS3 Qomplainerz 0 297 07-26-2023, 07:02 PM
Last Post: Qomplainerz
  How to make animations with CSS3 Qomplainerz 0 280 07-26-2023, 07:01 PM
Last Post: Qomplainerz
  How to make transitions with CSS3 Qomplainerz 0 322 07-26-2023, 06:59 PM
Last Post: Qomplainerz
  How to make shadows with CSS3 Qomplainerz 0 269 07-26-2023, 06:58 PM
Last Post: Qomplainerz
  How to make rounded corners with CSS3 Qomplainerz 0 248 07-26-2023, 06:51 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 2 Guest(s)