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

HTML

<!DOCTYPE html> <html lang="en"> <head> <title>On-hover effects: buttons, part 2</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> </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-yellow:hover .hidden, set opacity to be equal to 1.
  2. For .btn-yellow:hover .icon set the scale transform to the value 10.
  3. And also set opacity to 0.

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