Reputation: 5
Overflow hidden not working. It creates another scroll bar like in the image
I copied the code directly from Vuetify and tried it in code pen and the results were the same.
<template>
<v-card class="overflow-hidden">
<v-app-bar
absolute
color="#fcb69f"
dark
shrink-on-scroll
src="https://picsum.photos/1920/1080?random"
scroll-target="#scrolling-techniques-2"
>
<template v-slot:img="{ props }">
<v-img
v-bind="props"
gradient="to top right, rgba(19,84,122,.5), rgba(128,208,199,.8)"
></v-img>
</template>
<v-app-bar-nav-icon></v-app-bar-nav-icon>
<v-toolbar-title>Title</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon>mdi-magnify</v-icon>
</v-btn>`enter code here`
</v-app-bar>
<v-sheet
id="scrolling-techniques-2"
class="overflow-y-auto"
max-height="600"
>
<v-container style="height: 1000px;"></v-container>
</v-sheet>
</v-card>
</template>
Upvotes: 0
Views: 4566
Reputation: 659
This is happening for two reasons-
There is no fixed height of v-card, it's flexible to it's content. So, don't add overflow-hidden class to it. You should hidden in any of
html
orv-sheet
Upvotes: 0
Reputation: 397
You need to remove the overflow-hidden
class from the v-card
that wraps the v-app-bar
and v-sheet
. (You might just remove the v-card
altogether)
I would guess the vuetify docs have this so the examples work on their own site.
Upvotes: 1