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

276
Visualizações
How to make background image of full height

<div class="col-lg-12 text-center">
             <div class="for-video-background" style="background-image: url('./assets/images/back-video.png');">
               <a href="#">
                  <img src="./assets/images/play-icon.png" alt="" class="img-fluid" style="width: 5rem;">
               </a>
             </div>
          </div>

I want the background image to take full height and the sub-image must align the center of the background image. And at last it must be responsive.

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

0

You have to use "height:100vh"

<div class="col-lg-12 text-center">
  <div class="for-video-background" style="background-image: url('./assets/images/back-video.png');">
     <a href="#">
        <img src="./assets/images/play-icon.png" alt="" class="img-fluid" style="width: 5rem;height: 100vh">
     </a>
  </div>
</div>
about 4 years ago · Juan Pablo Isaza Relatório

0

Use width:100vh to make full height and use left and right make the image become center.

Use the background-size: cover to resize the background image to cover the entire container.

<div class="col-lg-12 text-center">
    <div class="for-video-background" >
               <a href="#">
                  <img src="./assets/images/play-icon.png" alt="" class="img-fluid" >
               </a>
             </div>
          </div>

CSS:

body{
    margin: 0;
}
img{
    width:5rem;
    position: absolute;
    left: 47.5%;
    top: 47.5%;

}
.for-video-background{
    height: 100vh;
     background-size: cover;
    background-image: url('./assets/images/back-video.png')
}
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