Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!