Interactive online courses HTML Academy
2026-03-09 10:58 Diff
  • index.html
  • style.css

HTML

<!DOCTYPE html> <html lang="en"> <head> <title>On-hover effects: buttons, part 3</title> <meta charset="utf-8"> <link rel="stylesheet" href="style.css"> </head> <body> <div class="buttons"> <button class="btn-green" type="button"> <img class="icon" src="icons/reload-6x-white.png" alt="Reloading the icon"> Refresh </button> <button class="btn-yellow" type="button"> <span class="hidden">25<img src="icons/dollar-6x-white.png" alt="Dollar icon"></span> <img class="icon" src="icons/cart-6x-white.png" alt="Cart icon"> Buy </button> <button class="btn-blue" type="button"> <span class="hidden"><img src="icons/envelope-open-6x-white.png" alt="Open envelope icon"></span> <img class="icon" src="icons/envelope-closed-6x-white.png" alt="Closed envelope icon"> Read </button> </div> </body> </html>

Thanks! We’ll fix everything at once!

You’ve gone to a different page

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

100%

  1. For .btn-blue:hover .icon, set opacity to 0.
  2. For .btn-blue:hover .hidden, set the scale transform to the value 1 and the opacity to 1.
  3. For .btn-blue .hidden, set the scale transform to the value 0.

After you complete every change, hover the cursor over the blue button to check your work.