Appear div when clicking on the image

Asked

Viewed 97 times

-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 I click on the image1 the div1 appears if I click on the imagem2 the div3 appears. But I want that when I click it to appear gradually, as if it were a paralax.

  • Guy posts the code you already have so far to get more help.

1 answer

1


to make a div appear or disappear you must 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;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.