3๐
โ
-
Remove the padding from
v-container
by applying aclass
ofpa-0
(setsp
adding ona
ll sides to0
). -
Remove margin and max-width from
v-container
by setting itsfluid
prop totrue
(adding the attribute is enough to set it totrue
). -
On
v-carousel
, remove thestyle
binding, as that is overridden by itsheight
prop. Instead, setv-carousel
โsheight
to100%
.
<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>
๐คtony19
Source:stackexchange.com