HTML Academy
transition-timing-function, step 4
Smooth transitions9/29
Back to the list of tasks
  • 1. The transition-duration property
  • 2. Transition duration, step 2
  • 3. The transition-property: which properties can be changed smoothly?
  • 4. The transition-delay property
  • 5. The “form” of the transition, transition-timing-function
  • 6. transition-timing-function, step 2
  • 7. transition-timing-function, step 3
  • 8. transition-timing-function, step 4
  • 9. Paper buttons, step 1
  • 10. Paper buttons, step 2
  • 11. Paper buttons, step 3
  • 12. Checkboxes, step 1
  • 13. Checkboxes, step 2
  • 14. Checkboxes, step 3
  • 15. Radio buttons, step 1
  • 16. Radio buttons, step 2
  • 17. Radio buttons, step 3
  • 18. Toggle switches, step 1
  • 19. Toggle switches, step 2
  • 20. Toggle switches, step 3
  • 21. Toggle switches, step 4
  • 22. The transformer icon, step 1
  • 23. The transformer icon, step 2
  • 24. The transformer icon, step 3
  • 25. The transformer icon, step 4
  • 26. Text input field, step 1
  • 27. Text input field, step 2
  • 28. Text input field, step 3
  • 29. Text input field, step 4
Paper buttons, step 2
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

Paper buttons, step 1

As you probably have already noticed, this chapter has been laid out using Material Design, which is the design language created by Google.

Let’s use what we’ve learned about transitions and try to reinvent the basic elements that make up a shape: text boxes, checkboxes, toggle switches, and more. In our implementation, they will follow the principles of Material Design and use smooth transitions when states are changed.

Let’s start with “paper” buttons that cast shadows. Let’s implement them using two pairs of radio buttons and associated labels. Create radio buttons and labels, and then visually hide the radio buttons.

Comments

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html lang="en"> <head> <title>Paper buttons, step 1</title> <meta charset="utf-8"> <link rel="stylesheet" href="material.css"> <link rel="stylesheet" href="style.css"> </head> <body class="blue-theme"> <section class="card"> <h1 class="question"><span>Does HTML stand for “How To Meet Ladies”?</span></h1> <form class="answers" action="https://echo.htmlacademy.ru/courses" method="post"> <button class="fab" type="submit">&#58882;</button> <div class="yes-no-selector"> <div class="paper-btn paper-btn-true"> <!-- <input type="radio" name="answer" id="yes-answer"> <label for="yes-answer"></label> --> </div> <div class="paper-btn paper-btn-false"> <!-- <input type="radio" name="answer" id="no-answer"> <label for="no-answer"></label> --> </div> </div> </form> </section> </body> </html>
CSS
.paper-btn { display: inline-block; margin: 58px 12px; } .paper-btn label { display: inline-block; width: 80px; border-radius: 3px; background-color: #f5f5f5; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); color: #616161; text-transform: uppercase; font-size: 14px; line-height: 40px; cursor: pointer; } .paper-btn input { }

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0
    1. Uncomment the radio button and its associated label in the .paper-btn-true block, and add the text True to the label,
    2. then uncomment the radio button and label in the .paper-btn-false block, and finally add the text False to the label.
    3. Hide the input fields inside the .paper-btn using display: none.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.