Jump to content

Recommended Posts

Posted

podes simplesmente usar css para detectar o "hover" do rato fazendo aparecer um div escondido ...

eu ja fiz isso de criar o div escondido e resulta mas o problema é que eu se passar com o rato ao lado da imagem ela faz aparecer a legenda

Posted

como asssim eu tenho isto:

<div id='pai'>
    <a href="iframe/V2 - Laranja/V2-Laranja.html"><img src="images/menu/foto 1 min 1.jpg" onMouseOver="this.src='images/menu/foto 1 min 2.jpg'" onMouseOut="this.src='images/menu/foto 1 min 1.jpg'" /></a>

   <div id="sera-mostrada">
      <p>V2 - Laranja</p>
  </div>
</div>

e o css é :

#pai #sera-mostrada {
display:none;
left:inherit;
position:inherit;
}
#pai:hover #sera-mostrada {
display:block
}

Posted
<html>
  <head>
    <style>
#pai {
background-color: #ddd;
height: 82px; /* ajustar ao tamanho da imagem */
}
#pai img {
height: 82px; /* ajustar ao tamanho da imagem */
background-color: #999;
}
#pai #sera-mostrada {
        display:none;
        left:inherit;
position: relative;
top: -20px; /* ajustar a altura pretendida */
}
#pai #sera-mostrada p {
margin: 0;
        height: 20px; /* ajustar a altura pretendida */
}
#pai:hover #sera-mostrada {
        display:block;
}
    </style>
  </head>
  <body>
    <div id='pai'>
      <a href="iframe/V2 - Laranja/V2-Laranja.html">
        <img src="images/menu/foto 1 min 1.jpg" onMouseOver="this.src='images/menu/foto 1 min 2.jpg'" onMouseOut="this.src='images/menu/foto 1 min 1.jpg'" />
      </a>
      <div id="sera-mostrada">
        <p>V2 - Laranja</p>
      </div>
    </div>
  </body>
</html>

--

Edit(brunoais):

  • Identificação da linguagem das tags code (estava mal escrito)
IRC : sim, é algo que ainda existe >> #p@p

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.