- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>The transition-duration property</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;
}
.btn-active {
background-color: #ff5252;
}
You’ve gone to a different page
Goalscompleted
0
- Assign
transition-duration: 1s
to the.btn
button.
Press the .btn
button in the mini browser to see a smooth transition. When the button is pressed, the btn-active
class is toggled.
Comments