Set up different speed curves with CSS transition-timing-function

To set up different speed curves with transition-timing-function, you can try to run the following code


Live Demo

<!DOCTYPE html>
         div {
            width: 100px;
            height: 100px;
            background: red;
            transition: width 4s;
         #effect1 {
            transition-timing-function: linear;
         #effect2 {
            transition-timing-function: ease-in;
         #effect3 {
            transition-timing-function: ease-out;
         div:hover {
            width: 250px;
      <h1>Transition Effect</h1>
      <p>Hover over the div elements and see the transition effect and the speed:</p>
      <div id = "effect1">linear effect</div><br>
      <div id = "effect2">ease-in effect</div><br>
      <div id = "effect3">ease-out effect</div><br>