Appear div by clicking on the image [duplicate]

-1

I need to make a selection system, where the user will always have 3 options depending on what he chooses. I need that when clicking on the image1 appears the div1 if clicking on the image2 appears to div3. But I want you to click this to appear in a gradual way, as if it were a parallax.

    
asked by anonymous 19.06.2018 / 20:48

1 answer

1

To make a div appear or disappear you should change the "display" property of it:

  <div style="display: none" > texto 1 </div> /* "none" quer dizer que ele está invisivel*/
  <div style="display: block" > texto 1 </div> /* "block" está visivel*/

You can make a CSS for this, and change it with javascript functions;

    
19.06.2018 / 21:46