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

108
Visualizações
how to overlap divs on half

I'm working with Vue 3and Bootstrap 5.

I have a v-for where I want to show the last card on top and the other ones below. But now all are ordered above each other.

I want to have that the card over the card which is showed below is overlapping half of it.

I've tried to put the position on absolute but than all cards will be on top of each other.

Hopefully someone could help me out!

<div v-for="(item, index) in array" :key="item.id">
  <div v-if="index == (array.length - 1)">
    <div class="card p-1">
      <div class="row">
        <div>{{ item.id }}</div>
      </div>
      <div class="row">
        <div class="text-center">
          <h1><i :class="item.icon"></i></h1>
        </div>
      </div>
      <div class="row">
        <div style="text-align: right;">
          <div>{{ item.id }}</div>
        </div>
      </div>
    </div>
  </div>
  <div v-if="index != (array.length - 1)">
    <div class="card p-1">
      <div class="row">
        <div>Value</div>
      </div>
      <div class="row">
        <div class="text-center">
          <h3>ICON</h3>
        </div>
      </div>
      <div class="row">
        <div style="text-align: right;">
          <div>Value</div>
        </div>
      </div>
    </div>
  </div>
</div>
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