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

<!DOCTYPE html>
<html>
<head>
  <title>Transitions Example</title>
  <style>
    /* Apply a transition to the div element */
    div {
      width: 200px;
      height: 100px;
      background-color: lightblue;
      transition: width 0.5s ease;
    }
    div:hover {
      width: 300px;
    }
  </style>
</head>
<body>
  <div>Hover over this div to see the transition effect.</div>
</body>
</html>

Explanation:

CSS transition property is used to add smooth transitions to element property changes. In this example, when hovering over the div element, its width transitions from 200 pixels to 300 pixels with a duration of 0.5 seconds and an ease timing function.
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 transitions with CSS3 - by Qomplainerz - 07-26-2023, 06:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Advanced transitions in CSS3 Qomplainerz 0 218 07-26-2023, 07:18 PM
Last Post: Qomplainerz
  How to make a grid layout with CSS3 Qomplainerz 0 204 07-26-2023, 07:03 PM
Last Post: Qomplainerz
  How to make a flexbox in CSS3 Qomplainerz 0 220 07-26-2023, 07:02 PM
Last Post: Qomplainerz
  How to make animations with CSS3 Qomplainerz 0 207 07-26-2023, 07:01 PM
Last Post: Qomplainerz
  How to make shadows with CSS3 Qomplainerz 0 196 07-26-2023, 06:58 PM
Last Post: Qomplainerz
  How to make gradients with CSS3 Qomplainerz 0 194 07-26-2023, 06:57 PM
Last Post: Qomplainerz
  How to make rounded corners with CSS3 Qomplainerz 0 174 07-26-2023, 06:51 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 3 Guest(s)