- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>transition-timing-function, step 3</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="material.css">
    <link rel="stylesheet" href="style.css">
  </head>
  <body class="theory-theme">
    <button class="fab fab-play" type="button"></button>
    <div class="row">
      <span class="square"></span>
    </div>
    <div class="row">
      <span class="square square-experimental"></span>
    </div>
  </body>
</html>
CSS
.square {
  left: 0;
  transition-duration: 3s;
  transition-property: left, border-radius;
}
.square-active {
  left: 75%;
  border-radius: 50%;
}
.square-experimental {
  background-color: #e74c3c;
}
You’ve gone to a different page
Goalscompleted
0
- Assign the transition shape cubic-bezier(0, 0, 1, 1)to the.squaresquares,
- then change this shape to cubic-bezier(0.785, 0.135, 0.15, 0.86)only for.square-experimental,
- and finally change it to cubic-bezier(0.175, 0.885, 0.32, 1).
Click the .fab-play button to start a smooth transition.
Comments