programarportugal Posted February 28, 2014 at 09:40 PM Report #547185 Posted February 28, 2014 at 09:40 PM Boas pessoal tenho duas imagens (imagem 1 e imagem 2 ) e quando passo o rato por cima da imagem 2 a imagem passa a outra imagem, mas como fasso para esconder a imagem 1??? thx
yoda Posted February 28, 2014 at 10:47 PM Report #547195 Posted February 28, 2014 at 10:47 PM Mostra o código. before you post, what have you tried? - http://filipematias.info sense, purpose, direction
programarportugal Posted February 28, 2014 at 10:53 PM Author Report #547197 Posted February 28, 2014 at 10:53 PM <style> .umastar { float:right; display: block; width: 20px; height: 20px; background: url('starfinal.jpg') bottom; text-indent: -99999px; } .umastar:hover { background: url('starfinal1.jpg') bottom; } </style> <style> .duasstar { float:right; display: block; width: 20px; height: 20px; background: url('starfinal.jpg') bottom; text-indent: -99999px; } .duasstar:hover { width: 40px; height: 20px; background: url('starfinal1.jpg') ; background: url('starfinal1.jpg') ; } } </style> ><a class="duasstar" href="#LinkURL">img</a><a class="umastar" href="#LinkURL">img</a>
Rechousa Posted February 28, 2014 at 10:54 PM Report #547198 Posted February 28, 2014 at 10:54 PM Olá, Vê aqui um exemplo usando apenas CSS: http://codepen.io/Rechousa/pen/aIcxb Espero ter ajudado, Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa
programarportugal Posted February 28, 2014 at 11:07 PM Author Report #547199 Posted February 28, 2014 at 11:07 PM ok vou tentar depois mando resultado thx o resultado esta o mesmo mas como faço para esconder uma imagem, quando estou no hover da outra?(duvida colocada no topico)
Rechousa Posted February 28, 2014 at 11:22 PM Report #547201 Posted February 28, 2014 at 11:22 PM O que é que queres fazer? Explica lá melhor isso e mostra código HTML, CSS só não chega. Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa
programarportugal Posted February 28, 2014 at 11:30 PM Author Report #547203 Posted February 28, 2014 at 11:30 PM tipo eu isto e so a parte de um site por isso como esta em testes estou a fazer noutro documento. tipo eu tenho 2 imagens e quando passo o rato por cima de uma ele mostra essa imagem com um tamanho maior e esconde a outra. so me falta a parte de esconde a imagem que nao tem o rato em cima. Entendeu? thx
Rechousa Posted February 28, 2014 at 11:38 PM Report #547204 Posted February 28, 2014 at 11:38 PM Usa jQuery para esconder: $("#imagem1").hover( $("#imagem2").hide(), $("#imagem2").show() ); Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa
programarportugal Posted February 28, 2014 at 11:45 PM Author Report #547205 Posted February 28, 2014 at 11:45 PM (edited) nao escondeu 😞 Edited February 28, 2014 at 11:46 PM by programarportugal
oxyzero Posted March 7, 2014 at 03:26 PM Report #547839 Posted March 7, 2014 at 03:26 PM (edited) <html> <head> <style> .img1 { width: 50px; height: 50px; background-color: red; } .img2 { display: none; width: 49px; height: 49px; background-color: white; border: 1px solid red; } .img1:hover > .img1 { display: none; } .img1:hover > .img2 { display: block; } </style> </head> <body> <div class="img1"> <div class="img2"></div> </div> </body> </html> Isto ajuda? Aqui funcionou-me perfeitamente. 🙂 edit: Eu sei que está pessimamente identado, foi com espaços visto que quando colo o código não fica direito, mas penso que dá para perceber claramente 😛 Edited March 7, 2014 at 03:27 PM by oxyzero
I-NOZex Posted March 7, 2014 at 06:50 PM Report #547852 Posted March 7, 2014 at 06:50 PM <script language="javascript"> function MouseRollover(MyImage) { MyImage.src = "MyPicture2.jpg"; } function MouseOut(MyImage) { MyImage.src = "MyPicture1.jpg"; } </script> <!-- (...) --> <img src="MyPicture1.jpg" border="0px" width="650px" height="550px" onmouseover="MouseRollover(this)" onmouseout="MouseOut(this)" /> B2R » Beat2Revolution v3.0b | Regista e divulga-nos beat2revolution.net
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now