Vuetify v-footer 覆盖内容

sla*_*ast 6 footer vue.js vuetify.js

我在使用 v-footer 时遇到了麻烦。它覆盖了内容。当我包含图像时,我看到这种情况发生。看看这支笔:

https://codepen.io/slayerbeast/pen/zYxYXZL

如果你滚动到最后,你会看到页脚如何在最后与内容重叠,为什么要这样做?我只想让页脚创建自己的空间...而且这种效果对于小型设备来说更糟糕,只需调整窗口大小

这是布局:

<v-app>
  <div class="header">
    <v-navigation-drawer v-model="drawer" app>
      <v-list-item>
        <v-list-item-content>
          <v-list-item-title class="title">
            {{ user.name }}
          </v-list-item-title>
        </v-list-item-content>
      </v-list-item>
      <v-divider></v-divider>

      <template v-slot:append>
        <v-list-item link @click="logout">
          <v-list-item-icon>
            <v-icon>logout</v-icon>
          </v-list-item-icon>

          <v-list-item-content>
            <v-list-item-title>
              logout
            </v-list-item-title>
          </v-list-item-content>
        </v-list-item>
      </template>
    </v-navigation-drawer>

    <v-app-bar absolute app dark height="100" class="px-12">
      (...)
    </v-app-bar>
  </div>

  <v-content>
    <p>content</p>
  </v-content>

  <v-footer absolute inset app width="auto" class="py-12">
    <v-container>
      <v-row justify="center">
        <v-col lg="2" md="3" cols="12" align-self="center">
          <v-img
            src="https://picsum.photos/id/419/200/300"
            max-width="50"
            max-height="50"
          />
        </v-col>
      </v-row>
    </v-container>
  </v-footer>
</v-app>
Run Code Online (Sandbox Code Playgroud)

小智 8

添加heigth="200"到 v 页脚:

<v-footer absolute inset app height="200" width="auto" class="py-12">
  <v-container>
    <v-row justify="center">
      <v-col lg="2" md="3" cols="12" align-self="center">
        <v-img
          src="https://picsum.photos/id/419/200/300"
          max-width="50"
          max-height="50"
        />
      </v-col>
    </v-row>
  </v-container>
</v-footer>
Run Code Online (Sandbox Code Playgroud)

https://codepen.io/TheEvilThinker/pen/JjooLmM

  • 如果我需要动态高度怎么办?在桌面设备上,页脚约为 150 像素,但在移动设备上,将列转换为行,页脚将增长到约 350 像素......我该如何实现这一点? (3认同)