Please note that you cannot set up any ARIA or other accessibility-related features using this technology, so the information you convey may be lost to parts of the user base. (This may be illegal depending on what the information is, who you are, and the control you are in/marketed to).
You may want to set tabindex or wrap the image in a button to make it accessible via keyboard/etc.
Also note that :active means "on click" not "after click". CSS has no "after click" pseudo-class (although :focus is sufficient in some cases).
You can achieve this by using a element replacing the function
contentattribute.Please note that you cannot set up any ARIA or other accessibility-related features using this technology, so the information you convey may be lost to parts of the user base. (This may be illegal depending on what the information is, who you are, and the control you are in/marketed to).
You may want to set
tabindexor wrap the image in a button to make it accessible via keyboard/etc.Also note that
:activemeans "on click" not "after click". CSS has no "after click" pseudo-class (although:focusis sufficient in some cases).img:active { content: url(http://placekitten.com/200/200); }