I have 9 images on one page, and the layout is made to look like a grid of 9 images. I have an image that I want to use as a frame for each image when you click on the image. This is a transparent image with a frame, for example, confirmation of the choice of image.
How can i do this? When I click on the image, the border image should appear again; when I click on the image, the frame image should disappear.
Is there a way to achieve this only with HTML and CSS
.image1 { left: 786 px; top: 629 px; position: absolute; width: 441 px; height: 243 px; float: left; } .image2 { left: 1284 px; top: 629 px; position: absolute; width: 441 px; height: 243 px; float: left; } .image3 { left: 289 px; top: 920 px; position: absolute; width: 441 px; height: 243 px; float: left; } <html> <body> <div class="image1"> <img src="images/image1.png" /> </div> <div class="image2"> <img src="images/image2.png" /> </div> <div class="image3"> <img src="images/image3.png" /> </div> </body> </html>
source share