Enlarge an image by clicking on it (HTML5 and CSS3)?

2

I'm having a problem, on smartphone the hover of css3 is not recognized (or rather, it takes about 5 seconds to be recognized), and I wanted to make an interactivity with the photos in my app, as I can not use the hover I'm I do not know what to do, but the solution would be to enlarge the image (or make other effects) when the user clicks / presses it. However I do not know how to do this, I tried a little using Jquery but I could not, I will not post code because I do not have it .. I can put the photo anyway, either as an image or background.

    
asked by anonymous 20.05.2015 / 19:06

3 answers

1

Friend search for this css property focus and keyframes these two links are well explained you can join with each other and have the effect you want because the :focus property is activated with the click and you can then mix the click action :focus with keyframe

    
16.06.2015 / 22:15
2

You can do this using the jQuery animate, as in the example I created

EXAMPLE HERE

    
19.08.2015 / 22:06
1

There are ready-to-use tools such as Lightbox or Fancybox . Or even you can download the source code of one of these solutions, study and develop your own solution. You can also use a thumbnail with a link to the full size image (in a simpler way).

    
25.09.2015 / 14:15