Is it possible to keep the properties set in :hover , when you are at the address of the clicked button?
To clarify let’s say I have a button that turns red when I click it and it redirects to mysite.com/buttonPage.html. On buttonPage.html can I keep the button red?
Normally, on the server side you add a class to the button/link if it’s destination matches the current page. Something like (in PHP):
Then add the
.currentselector to the styles for:hover.This doesn’t actually “maintain state”, but should do what you want.