Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/01/2018, 09:45
Avatar de guille_delfino
guille_delfino
 
Fecha de Ingreso: julio-2014
Ubicación: Buenos Aires, Argentina
Mensajes: 125
Antigüedad: 9 años, 9 meses
Puntos: 4
Exclamación Problemas con mobile first design

Buenas tardes,

Estoy intentando crear un sitio first mobile pero tengo un problema al abrirlo en mi smartphone, me lo abre con la resolución de 960px en lugar de 480px; es decir, cuando abro el index desde mi smartphone, me muestra el fondo en amarillo en lugar de rojo como lo declaro en el css y no logro encontrar el error.

******** Este es el index.php:

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="es-AR">
  3.     <title>Mobile first</title>
  4.     <link rel="stylesheet" href="css/reset.css">
  5.     <link rel="stylesheet" href="css/estilos.css">
  6. </head>
  7.     <h1>Mobile firest</h1>
  8. </body>
  9. </html>


****** Este es el estilo.css:

Código CSS:
Ver original
  1. @charset "UTF8";
  2.  
  3. body{
  4.     background: red;
  5. }
  6.  
  7.  
  8. @media screen and (min-width: 480px){
  9.  
  10. body{
  11.     background: blue;
  12. }
  13.  
  14. }
  15.  
  16. @media screen and (min-width: 767px){
  17.  
  18. body{
  19.     background: green;
  20. }
  21.  
  22. }
  23.  
  24. @media screen and (min-width: 960px){
  25.  
  26. body{
  27.     background: yellow;
  28. }
  29.  
  30. }
  31.  
  32. @media screen and (min-width: 1280px){
  33.  
  34. body{
  35.     background: grey;
  36. }
  37.  
  38. }
__________________
Atentamente,

Guillermo Delfino
[email protected]

Última edición por pzin; 30/01/2018 a las 01:26 Razón: Highlight código.