Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/01/2012, 13:37
Avatar de C2am
C2am
 
Fecha de Ingreso: enero-2009
Ubicación: Rosario, Argentina
Mensajes: 2.005
Antigüedad: 15 años, 3 meses
Puntos: 306
Respuesta: mostrar etiqueta DIV

Hola oskar
Bueno, jugando un poco hice esto.

Espero que te sirva.
Copio el código para que quede también en el foro (por si el enlace no funciona)
Código HTML:
Ver original
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. </head>
  3.  
  4.  
  5. <h3>Transiciones horizontales</h3>
  6. <div id="horizontal">
  7. <div id="izq">De Izquierda a Derecha</div>
  8.  
  9. <div id="der">De Derecha a Izquierda</div>
  10. </div>
  11.  
  12.  
  13.  
  14. <h3>Transiciones verticales</h3>
  15. <div id="vertical">
  16.  
  17. <div id="arriba">De Arriba a Abajo</div>
  18. <div id="abajo">De Abajo a Arriba</div>
  19.  
  20. </div>
  21. </body>
  22. </html>

Y el css:
Código CSS:
Ver original
  1. #horizontal{
  2. position:relative;
  3. width: 200px;
  4. height:200px;
  5. border: 1px solid #C30;
  6. }
  7.  
  8. #izq, #der, #arriba, #abajo
  9. {
  10. width: 100px;
  11. height:100px;
  12. font-size:14px;
  13. color:#FFF;
  14. text-align:center;
  15. }
  16.  
  17. #izq
  18. {
  19.  position:relative;
  20.  background-color:red;
  21.  transition-property:width 1s linear  2s;
  22. /* Firefox 4 */
  23. -moz-transition:width 1s linear 1s;
  24. /* Safari and Chrome */
  25. -webkit-transition:width 1s linear 2s;
  26. /* Opera */
  27. -o-transition:width 1s linear 2s;
  28. }
  29.  
  30. #der
  31. {  
  32.     position:absolute;
  33.     right:0px;
  34.     background-color:blue;
  35.     transition-property:width 1s linear 2s;
  36.     /* Firefox 4 */
  37. -moz-transition:width 1s linear 2s;
  38.     /* Safari and Chrome */
  39. -webkit-transition:width 1s linear 2s;
  40.     /* Opera */
  41. -o-transition:width 1s linear 2s;
  42. }
  43.  
  44. #izq:hover, #der:hover
  45. {
  46. width:200px;
  47. }
  48.  
  49. #vertical{
  50. position:relative;
  51. width:200px;
  52. height:200px;
  53. border:1px solid #C30;
  54. }
  55.  
  56. #arriba
  57. {  
  58.    position:relative;
  59.     background-color:#F63;
  60.     transition-property:height 1s linear 2s;
  61.     /* Firefox 4 */
  62. -moz-transition:height 1s linear 2s;
  63.     /* Safari and Chrome */
  64. -webkit-transition:height 1s linear;
  65.     /* Opera */
  66. -o-transition:height 1s linear 2s;
  67. }
  68. #abajo
  69. {
  70.     position:absolute;
  71.     left:100px;
  72.     bottom:0px;
  73.     background-color:#939;
  74.     transition-property:height 1s linear 2s;
  75.     /* Firefox 4 */
  76. -moz-transition:height 1s linear 2s;
  77.     /* Safari and Chrome */
  78. -webkit-transition:height 1s linear 2s;
  79.     /* Opera */
  80. -o-transition:height 1s linear 2s;
  81. }
  82. #arriba:hover, #abajo:hover
  83. {
  84.     height:200px;
  85. }

PD: Si alguien lo quiere mejorar bienvenido sea. O si ve alguna bestialidad siéntase con el derecho de aportar su critica constructiva
PD: otro ejemplo con mas movimientos
__________________
El mundo nada puede contra un hombre que canta en la miseria.
-- Ernesto Sábato--

Última edición por C2am; 04/01/2012 a las 18:46