HTML & CSS · Junior · Question 49 of 75

How do you change a button's background on hover in Tailwind?

Explanation

States in Tailwind are set with variant prefixes: hover:, focus:, focus-visible:, active:, disabled: and so on. Prefixes can be combined: md:hover:bg-blue-600. Tailwind has no :hover- or on-hover: syntax.

Further reading

Problem with a question

HTML & CSS · Junior · question 49

Test yourself

Take the HTML & CSS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz