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

109
Visualizações
Using Scroll on bootstrap

I want to implement scroll in bootstrap on my child component (ProductList.vue). Can anyone help me how to paste the code in boostrap 5? I've looked for the problem but haven't found it yet. This is my bootstrap 5 code on child component (ProductList.vue)


    <template>
        <div class="row d-flex justify-content-center">
          <div
            class="card text-center card-wrapper"
            style="width: 18rem"
            v-for="product in products"
            :key="product.item"
          >
            <img class="p-2" style="max-height:200px; height:100%" :src="product.imgUrl" alt="product.title" />
            <div class="card-body ">
              <h5 class="card-title text-truncate">{{ product.title }}</h5>
              <p class="card-text">$ {{ product.price }}</p>
              <a href="#" class="btn btn-primary">Add to cart</a>
            </div>
          </div>
        </div>
    </template>
    
    <script>
    import products from "../item/product.json";
    export default {
      name: "ProduckList",
      data() {
        return {
          products,
        };
      },
    };
    </script>
    
    <style scoped>
        .card-wrapper {
          background-color: rgb(149, 211, 247);
        }
    </style>

this is on parent component (App.vue)


    <template>
      <Header />
        <div class="row">
          <div class="col-8">
              <produck-list />
          </div>
          <div class="col-4">
            <Cart />
          </div>
      </div>
    </template>
    
    <script>
    import Header from "./components/Header.vue";
    import ProduckList from "./components/ProductList.vue";
    import Cart from "./components/Cart.vue";
    export default {
      components: {
        Header,
        ProduckList,
        Cart,
      },
    };
    </script>
    
    <style>
      body {
            background-color: rgb(13, 30, 37)!important;
          }
    </style>

I want the results of cards to be scrollable like this https://getbootstrap.com/docs/5.0/utilities/overflow/

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

0

It seems that you haven't added the overflow-auto short hand to your top div, perhaps editing your top div as follows may help.

<div class="row d-flex justify-content-center overflow-auto">

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