Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/10/2012, 16:54
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: No devuelve opacidad

Debería.
Estás leyendo el DOM antes de hacer el cambio?

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6.  
  7. <style type="text/css">
  8. /*<![CDATA[*/
  9.  
  10. /* estilos */
  11. #banner{
  12. background-color: red;
  13. height: 400px;
  14. width: 400px;
  15. opacity: .5;
  16. }
  17. /*]]>*/
  18. <script type="text/javascript">
  19. //<![CDATA[
  20. function tr(){
  21. var transicion = document.getElementById("banner");  
  22. transicion.style.opacity="1";
  23. }
  24. window.onload = tr;
  25. //]]>
  26. </head>
  27. <div id="banner">
  28. </div>
  29. </body>
  30. </html>

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.