Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

214
Vistas
Why viewport meta tag in Chromium is invalid?

I hope my web to be Mobile browser. I already set <meta name="viewport" content=" width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;"> in my index.html,and it will display normall in Firefox.(width is device width ,not 980px).But I open the web in Mobile chrome,the layout width is 980px ,not device-width. Then I add javascript in html:

 <script>
(function () {
  function
  autoRootFontSize() {
    document.documentElement.style.fontSize = Math.min(screen.width,
    document.documentElement.getBoundingClientRect().width) / 980 * 320 + 'px';
  }
  window.addEventListener('resize', autoRootFontSize)
  autoRootFontSize();
})();

The Mobile Chrome is narmal.Then I have used the commmand 'npm run build' to package my projects and open the web,but viewport width still is 980px.

How to solve this question ?

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda