I have an image and I am trying to click on it to give me a flip effect that I have already done and to return the image to me. The point is that I have handled it with over and active. But one does it to me when I have the mouse on top of the image and the other when I click on the image, and I have to have the mouse pressed on the image while doing the whole transition.
My idea is that when I click on an image of a letter I return to the letter and it shows. And when I press it again it returns to its origin state. and I do not know if I can deal with this via css.
.flip:active {
transform: perspective(500px) rotateY(-180deg) translateX(100%);
}
flip is the class that has the containers of the letters in the image
Is there any css property like the onclick?