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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Advanced transitions in CSS3 Qomplainerz 0 303 07-26-2023, 07:18 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 292 07-26-2023, 07:02 PM
Last Post: Qomplainerz
  How to make animations with CSS3 Qomplainerz 0 277 07-26-2023, 07:01 PM
Last Post: Qomplainerz
  How to make shadows with CSS3 Qomplainerz 0 265 07-26-2023, 06:58 PM
Last Post: Qomplainerz
  How to make gradients with CSS3 Qomplainerz 0 257 07-26-2023, 06:57 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: 6 Guest(s)