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

78
Visualizações
Is use inch measure proven stable for dynamic?

I try to create a website with mind size device. I overwhelmed with today device. the resolution that need to work with so many, and will increase with high resolution. but, the pychical dimension still same around 50mm - 70mm width for mobile. Is 1in unit stable to measure inch?

<div id="container">
            Iphone 4s dimension
</div>
<script>
function mmInPixel() {
    const e = document.createElement("div");
    e.style.width = "1in";
    document.body.appendChild(e);

    const pixel = (screen.width / ((screen.width / e.offsetWidth) * 2.54 * 10));
    document.body.removeChild(e);
    
    return pixel;
}

const container = document.getElementById("container");
const width = (mmInPixel() * 49);
const height = (mmInPixel() * 74);
container.style.width = `${width}px`;
container.style.height = `${height}px`;
container.style.backgroundColor = "black";
container.style.color = "white";
container.style.margin = "auto";
about 4 years ago · Juan Pablo Isaza
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