I think the best example of what I am thinking of would be like you click on an image and it changes the filter and that filter stays even if you’re not holding down on the image.
At first I thought maybe I could use the :active pseudo-class on an image to make it grayscale upon click as a test however it didn’t work. Then I tried making the image a link and doing
a:visited {
filter: grayscale(100%);
}
however, it did not work.
2
Answers
You can’t do that by pure CSS, but you can use a hidden checkbox to manipulate the image.
Play with
transition
and you can simulate it: