Hacks específicos para navegadores

0 - , - 05/04/2010 07:56:21

A veces es útil apuntar a determinados navegadores para darle instrucciones específicas o fijar sus incoherencias.

/* IE 6 */
* html .nombre_clase { }

/* IE 7 */
*+html .nombre_clase{ }

/* IE 7 y navegadoes actuales */
html>body .nombre_clase { }

/* Navegadores actuales(no IE 7) */
html>/**/body .nombre_clase { }

/* Opera 9.27 y posteriores */
html:first-child .nombre_clase { }

/* Safari */
html[xmlns*=""] body:last-child .nombre_clase { }

/* Safari 3+, Chrome 1+, Opera 9+, Fx 3.5+ */
body:nth-of-type(1) .nombre_clase { }

/* Safari 3+, Chrome 1+, Opera 9+, Fx 3.5+ */
body:first-of-type .nombre_clase {  }

/* Safari 3+, Chrome 1+ */
@media screen and (-webkit-min-device-pixel-ratio:0) {
 .nombre_clase  {  }
}

Deja tu comentario

  • El comentario debe estar relacionado con el contenido de la entrada.
  • Comentarios ofensivos, con spam o con lenguaje inapropiado serán eliminados.

captcha