英文:
How to position a v-row at the end of a v-tab-item
问题
I currently have a v-tab vuetify and inside it a v-tab-item containing three v-rows. I'm trying to align the last v-row to the end of the container as shown in the attached image.
Below is the code example:
<v-container class="pa-0">
<v-card flat>
<v-tabs fixed-tabs>
<v-tab>
tab 1
</v-tab>
<v-tab>
tab 2
</v-tab>
<v-tab-item>
<v-row
style="border: 2px solid red;"
no-gutters
>
<v-col>
Lorem ipsum...
</v-col>
</v-row>
<v-row
style="border: 2px solid purple;"
no-gutters
>
<v-col>
Lorem ipsum...
</v-col>
</v-row>
<v-row
style="border: 2px solid orange;"
no-gutters
>
<v-col>
Lorem ipsum...
</v-col>
</v-row>
</v-tab-item>
</v-tabs>
</v-card>
</v-container>
英文:
I currently have a v-tab vuetify and inside it a v-tab-item containing three v-rows. I'm trying to align the last v-row to the end of the container as shown in the attached image.
Below is the code example
<v-container class="pa-0">
<v-card flat>
<v-tabs fixed-tabs>
<v-tab>
tab 1
</v-tab>
<v-tab>
tab 2
</v-tab>
<v-tab-item>
<v-row
style="border: 2px solid red;"
no-gutters
>
<v-col>
Lorem ipsum...
</v-col>
</v-row>
<v-row
style="border: 2px solid purple;"
no-gutters
>
<v-col>
Lorem ipsum...
</v-col>
</v-row>
<v-row
style="border: 2px solid orange;"
no-gutters
>
<v-col>
Lorem ipsum...
</v-col>
</v-row>
</v-tab-item>
</v-tabs>
</v-card>
</v-container>
答案1
得分: 1
将属于顶部和底部的行分别包装在不同的div中,然后将父元素设置为flex列布局,并使用justify space-between。
```css
.row-container {
height: calc(100vh - 48px);
display: flex;
flex-direction: column;
justify-content: space-between;
}
英文:
Wrap the rows that belong at the top and at the bottom in different divs, then make the parent a flex column with justify space-between
<v-tab-item class="row-container">
<div class="top-rows">
<v-row style="border: 2px solid red" no-gutters>
<v-col> Lorem ipsum... </v-col>
</v-row>
<v-row style="border: 2px solid purple" no-gutters>
<v-col> Lorem ipsum... </v-col>
</v-row>
</div>
<div class="bottom-rows">
<v-row style="border: 2px solid orange" no-gutters>
<v-col> Lorem ipsum... </v-col>
</v-row>
</div>
</v-tab-item>
.row-container {
height: calc(100vh - 48px);
display: flex;
flex-direction: column;
justify-content: space-between;
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论