- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>transition-timing-function, step 4</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: all linear 3s;
}
.square-active {
left: 75%;
border-radius: 50%;
}
.square-experimental {
background-color: #e74c3c;
}
You’ve gone to a different page
Goalscompleted
0
- Assign the transition form
steps(5, start)
to the.square-experimental
square, - and then change it to
steps(5, end)
.
Click the .fab-play
button to start a smooth transition.
Comments