如何使卡具有相同的高度?
我的卡高音并未按照我的预期显示。我当时想将最大高度设置为我的V-Card-Text
<v-col cols="3" v-for="note in notes">
<v-card :loading="loading" max-width="374">
<template slot="progress">
<v-progress-linear color="deep-purple" height="10" indeterminate></v-progress-linear>
</template>
<v-img height="250" :src="note.img"></v-img>
<v-card-title>{{ note.name }}</v-card-title>
<v-card-text height="200px">
<div>{{ note.description }}</div>
</v-card-text>
<v-card-text>
<v-chip-group v-model="selection" active-class="deep-purple accent-4 white--text" column>
<v-chip v-for="tag in note.tag">
{{ tag }}
</v-chip>
</v-chip-group>
</v-card-text>
</v-card>
</v-col>
我认为
对我没有任何建议吗?
My card hights is not displaying consistently as I intended. I was thinking to set the max-height to my v-card-text
<v-col cols="3" v-for="note in notes">
<v-card :loading="loading" max-width="374">
<template slot="progress">
<v-progress-linear color="deep-purple" height="10" indeterminate></v-progress-linear>
</template>
<v-img height="250" :src="note.img"></v-img>
<v-card-title>{{ note.name }}</v-card-title>
<v-card-text height="200px">
<div>{{ note.description }}</div>
</v-card-text>
<v-card-text>
<v-chip-group v-model="selection" active-class="deep-purple accent-4 white--text" column>
<v-chip v-for="tag in note.tag">
{{ tag }}
</v-chip>
</v-chip-group>
</v-card-text>
</v-card>
</v-col>
I see no effect
Any suggestions for me ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以实现这一目标:
如果您不想要卷轴,并且裁剪的文字很好:
Overflow-y:hidden;
缺点:
想要在浏览器上自定义滚动栏外观,这些浏览器在桌面上显示宽滚动条(
17px
)(例如:Chrome)。另外,如果您希望每行中的最高卡设置高度(带有不同高度的卡的行)且没有任何溢出,但是在某些卡上有一些空白,我可以帮助您实现它,如果您创建了它可运行的片段,所以我可以测试。原则上,您需要给出卡容器
显示:flex; flex方向:列;
并给出.v-card-text {flex-grow:1}
。在实践中,该卡可能包含多个包装器,这就是为什么如果您对此解决方案感兴趣,我需要看现场片段的原因。
You can achieve it with:
If you don't want a scrollbar and you're fine with the text being cropped:
overflow-y: hidden;
Shortcomings:
.v-card-text
will always have this height, even if all items on a row end up not using all of it17px
) on desktop (e.g: Chrome).Alternatively, if you want the tallest card in each row to set the height (resulting in rows with cards of different heights) and not have any overflow, but have some white space on some cards instead, I can help you achieve it if you create a runnable snippet, so I can test. In principle, you need to give the card container
display: flex; flex-direction: column;
and give.v-card-text { flex-grow: 1 }
.In practice, the card might have more than one wrapper, which is why I need to see a live snippet, if you're interested in this solution.