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

387
Visualizações
El carrusel de Vuetify no ocupa todo el ancho y alto

Quiero hacer un carrusel que ocupe todo el ancho y alto de una ventana gráfica. Estoy usando Vuetify en un proyecto vue.js 2. Aquí está mi código:

 <head> <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.x/css/materialdesignicons.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> </head> <body> <div id="app"> <v-app> <v-main> <v-container fill-height> <v-carousel cycle hide-delimiters style="height: 100%;"> <v-carousel-item> <v-sheet color="red lighten-1" fill-height style="height: 100%"> <v-row class="fill-height" align="center" justify="center" > <div class="text-h2"> Slide One </div> </v-row> </v-sheet> </v-carousel-item> <v-carousel-item> <v-sheet color="warning" style="height: 100%"> <v-row class="fill-height" align="center" justify="center" > <div class="text-h2"> Slide Two </div> </v-row> </v-sheet> </v-carousel-item> </v-carousel> </v-container> </v-main> </v-app> </div> <script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script> <script> new Vue({ el: '#app', vuetify: new Vuetify(), }) </script> </body>
(Esa es una versión que se renderizará en desbordamiento de pila) El resultado en mi extremo se ve así: Captura de pantalla del resultado final

Estoy usando la última versión de Opera GX para renderizarlo y estoy usando vue serve para servirlo.

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

0

  1. Retire el relleno del v-container aplicando una class de pa-0 (establece p agregando en todos los lados a 0 ).

  2. Elimine el margen y el ancho máximo de v-container configurando su propiedad fluid en true (agregar el atributo es suficiente para configurarlo en true ).

  3. En v-carousel , elimine el enlace de style , ya que está anulado por su accesorio de height . En su lugar, establezca la height de v-carousel en 100% .

 <v-container class="pa-0" 1️⃣ fluid 2️⃣ fill-height> <v-carousel height="100%" 3️⃣ ⋯> 

 <head> <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.x/css/materialdesignicons.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> </head> <body> <div id="app"> <v-app> <v-main> <v-container class="pa-0" fluid fill-height> <v-carousel height="100%" cycle hide-delimiters> <v-carousel-item> <v-sheet color="red lighten-1" fill-height style="height: 100%"> <v-row class="fill-height" align="center" justify="center"> <div class="text-h2"> Slide One </div> </v-row> </v-sheet> </v-carousel-item> <v-carousel-item> <v-sheet color="warning" style="height: 100%"> <v-row class="fill-height" align="center" justify="center"> <div class="text-h2"> Slide Two </div> </v-row> </v-sheet> </v-carousel-item> </v-carousel> </v-container> </v-main> </v-app> </div> <script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script> <script> new Vue({ el: '#app', vuetify: new Vuetify(), }) </script> </body>

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