vuetify.js - Vuetify 2.2,为什么我的页脚没有在代码笔的绝对底部对齐?
问题描述
我在这个代码笔里面有一个代码笔我有 vuetify 2.2.15。
我使用页脚如下:
<div id="app">
<v-app>
<v-content>
<v-container>
<v-card>
<v-card-text>
Expected to align at bottom
</v-card-text>
</v-card>
</v-container>
<v-content>
<v-footer>
<v-col
class="text-center"
>
footer
</v-col>
</v-footer>
</v-app>
</div>
在网络上运行的真实代码中,这个页脚是在绝对底部对齐的。但是在代码笔中,页脚并没有在绝对底部对齐,而是相对地跟随上一个组件。
我应该使用任何缺失的堆栈吗?谢谢您的建议。
解决方案
你应该使用absolute
你v-footer
喜欢的:
<v-footer absolute>
<v-col class="text-center">
footer
</v-col>
</v-footer>
absolute 属性适用position: absolute
于组件。
你也应该</v-content>
在你的页脚之后移动
你的最终代码应该是这样的:
<div id="app">
<v-app>
<v-content>
<v-navigation-drawer app></v-navigation-drawer>
<v-container>
<v-card
>
<v-card-text
>
Expected to align at bottom
</v-card-text>
</v-card>
</v-container>
<v-footer absolute>
<v-col
class="text-center"
>
footer
</v-col>
</v-footer>
</v-content>
</v-app>
</div>
推荐阅读
- firefox-addon-webextensions - 使用 firefox webextension 截取网页截图?
- azure - 在 Azure 上发布 WebApi 后出现“unsupported_grant_type”
- java - 文本选择标题错误
- mongodb - 是否必须安装附加组件才能在 Heroku 中部署 Mongo?
- mysql - sequelize.js addIndex 不使用 indexName
- javascript - 从多个嵌套数组创建新数据对象集
- r - 稳健的回归不起作用 - “找不到对象'msg.UCV'”
- c# - 如何从带有 C# 分隔符的文本文件(.txt)中获取特定列
- excel - 在添加数组之前检查文件扩展名是否为 .xlsx
- python - 如何将字符串转换为似乎已经是字典的字典?