Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

386
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda