Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Advanced transitions in CSS3
#1
Example:

<!DOCTYPE html>
<html>
<head>
  <title>Advanced Transitions Example</title>
  <style>
    /* Add a custom easing function to the transition */
    div {
      width: 100px;
      height: 100px;
      background-color: lightblue;
      transition: width 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    }
    div:hover {
      width: 200px;
    }
  </style>
</head>
<body>
  <div>Hover over this div to see the transition effect.</div>
</body>
</html>

Explanation:

Advanced transitions can use custom easing functions (cubic-bezier) to control the animation's acceleration and deceleration. In this example, the div element grows its width from 100 pixels to 200 pixels smoothly over 1 second using a custom easing 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 media queries in CSS3 Qomplainerz 0 386 07-26-2023, 07:22 PM
Last Post: Qomplainerz
  Advanced animations in CSS3 Qomplainerz 0 361 07-26-2023, 07:19 PM
Last Post: Qomplainerz
  How to make transitions with CSS3 Qomplainerz 0 314 07-26-2023, 06:59 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 3 Guest(s)