Right now I have a button with a span in it, I would like to have the abilty when the button is clicked that the span’s bg will change and stay changed.Is this possible ? And yes I know I can use javascript for this but I would like a pure css solution if possible
Share
If it was a link (
<a>) you could try using the:visitedselector, but since buttons aren’t links, there’s no pure CSS that’ll do this for you.If you can style an
<a>to look like your button, and then you could use the selector: