- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Transition duration, step 2</title>
<meta charset="utf-8">
<link rel="stylesheet" href="material.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="theory-theme">
<button class="btn" type="button"></button>
</body>
</html>
CSS
.btn {
background-color: #ffffff;
transition-duration: 1s;
}
.btn-active {
background-color: #ff5252;
}
You’ve gone to a different page
Goalscompleted
0
- Assign a text color of
#ffffff
and atransform: rotate(45deg)
rotation for the active state of the.btn-active
button, - and then change the
transition-duration
for the.btn
button to200ms
.
Click the .btn
button in the mini-browser to switch its btn-active
class and see a smooth transition.
Comments