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

322
Visualizações
How to detect the if the height has reached 70vh and if so get the width?

Say I have a container which height is calculated by it's width. Width changes dynamically base on the viewport width of the screen. I want to detect when the height has reached 70vh or any number and if the limit has reached I want to get it's width. That has to happen dynamically base on the viewport width and height. For instance, I load the page and the height has reached 70vh and when it reached 70vh, it's width is say 1072px. I want to do that dynamically. Does any one know any formula to do that??

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use this in your script file it will print your screen dimensions for you

const width  = window.innerWidth || document.documentElement.clientWidth || 
document.body.clientWidth;
const height = window.innerHeight|| document.documentElement.clientHeight|| 
document.body.clientHeight;

console.log(width);
console.log(height)
document.write("The Height is  " + height + "px  ")
document.write("The width is &nbsp" + width + "px")

about 4 years ago · Juan Pablo Isaza Relatório
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