【发布时间】:2018-04-20 20:50:54
【问题描述】:
我正在尝试使用 vue 和 vuetify 添加一张卡片,这将占用我容器中的空间,使用 v-flex 创建一个水平卡片,其垂直行为方式相同。我尝试使用填充高度、child-flex 等添加 100% 的高度样式,但我无法获得卡片的大小来填充容器。调节高度的正确方法是什么?
参考:https://vuetifyjs.com/en/components/cards
<div id="app">
<v-app id="inspire">
<v-toolbar color="green" dark fixed app>
<v-toolbar-title>My Application</v-toolbar-title>
</v-toolbar>
<v-content >
<v-container fluid fill-height >
<v-layout
justify-center
align-center
>
<v-flex text-xs-center >
<v-card class="elevation-20" >
<v-toolbar dark color="primary">
<v-toolbar-title>I want this to take up the whole space with slight padding</v-toolbar-title>
<v-spacer></v-spacer>
</v-toolbar>
<v-card-text>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
</v-container>
</v-content>
<v-footer color="green" app inset>
<span class="white--text">© 2018</span>
</v-footer>
</v-app>
</div>
【问题讨论】:
-
喜欢这个codepen?
-
评论有点晚,但我遇到了类似的问题,需要添加溢出:隐藏到卡片和卡片文本
标签: css vue.js vuetify.js