Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

216
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda