Icon Button
HTML / CSS
20 pts
Icon Button
Make a green button whose tick icon follows the text colour:
.btn: text colour white, background green..btn svg: 20px × 20px,fill: currentColor;andvertical-align: middle;.
Do not write white as the fill — use currentColor, so the icon changes when the text colour changes.
Checklist
- Make the button white text on green.
- Make the icon 20px and line it up with the text.
- Make the icon follow the text colour.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
