Ver Mensaje Individual
  #9 (permalink)  
Antiguo 22/10/2011, 15:15
kseso?
Colaborador
 
Fecha de Ingreso: junio-2007
Mensajes: 5.798
Antigüedad: 16 años, 11 meses
Puntos: 539
Respuesta: Realizar hover sobre un elemento y ocultar otro

Es porque no tiene en cuenta un pequeño detalle en el html. A ver si lo descubre:
Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <meta charset="UTF-8">
  3. <title>Kseso? jugando con css</title>
  4. <style type="text/css">
  5. * {
  6.   margin:0; padding:0; position: relative;
  7. }
  8. #con {
  9.     width: 600px;
  10.     margin: 0 auto;
  11.     overflow: hidden;
  12.     background: #d4d4d4;
  13. }
  14. #uno, #dos, #tres {
  15.   float:left;
  16.   width: 200px;
  17.   height: 250px;
  18.   color: #603;
  19.   padding-bottom: 40px;
  20. }
  21. #dos {
  22.   background: #fff;
  23.   -moz-transition: all 1s;
  24.   -webkit-transition: all 1s;
  25.   transition: all 1s;
  26. }
  27. #ocultar {
  28.   position: absolute;
  29.   bottom: 0;
  30.   left:0;
  31.   width: 100%;
  32.   height: 40px;
  33.   background: #fc0;
  34.   text-align: center;
  35.   z-index: 5;
  36. }
  37. #ocultar:hover { cursor: pointer;}
  38. #ocultar:hover ~ #dos {
  39.   color: #fff;
  40.   background: #404040;
  41.   font-size: 400%;
  42.   -moz-transition: all 1s;
  43.   -webkit-transition: all 1s;
  44.   transition: all 1s;
  45. }
  46. </style>   
  47. </head>
  48. <div id="con">
  49.   <div id="ocultar">ocultar</div>
  50.   <div id="uno">uno</div>
  51.   <div id="dos">dos</div>
  52.   <div id="tres">tres</div>
  53. </div>
  54. </body>
  55. </html>