【问题标题】:Vuetify grid system wont justify horizontal position of elementsVuetify 网格系统不会证明元素的水平位置
【发布时间】:2021-09-17 19:19:35
【问题描述】:

我正在尝试建立一个记分牌,现在我为每支球队准备了两张牌。在每张卡片中应有两行:一排为球队标志,一排为当前比分。我现在的问题是徽标和分数的对齐不起作用。两人都还在左边。通过反复试验,我现在得到了这个,但我被卡住了。有人能看出我的错误吗?

感谢任何帮助!

模板:

<template>
  <v-container fluid>
    <v-row class="ma-5" dense align="center" justify="center">
      <v-col cols="5">
        <v-card elevation="10" outlined>
          <v-container>
            <v-row align="center" justify="center" no-gutters>
              <v-col>
                <v-img
                    src="@/assets/home.png"
                    width="65%"
                />
              </v-col>
            </v-row>
            <v-row justify="center" align="center" no-gutters>
              <v-col>
                <span style="font-size: 16rem">
                  {{ this.homeScore }}
                </span>
              </v-col>
            </v-row>
          </v-container>
        </v-card>
      </v-col>
      <v-col cols="2">
        <v-img
            src="@/assets/vs.png"
        />
      </v-col>
      <v-col cols="5">
        <v-card elevation="10" outlined class="">
          <v-container>
            <v-row align="center" justify="center" no-gutters>
              <v-col>
                <v-img
                    src="@/assets/away.png"
                    width="65%"
                />
              </v-col>
            </v-row>
            <v-row justify="center" align="center" no-gutters>
              <v-col>
                <span style="font-size: 16rem">
                  {{ this.awayScore }}
                </span>
              </v-col>
            </v-row>
          </v-container>
        </v-card>
      </v-col>
    </v-row>
  </v-container>
</template>

【问题讨论】:

    标签: javascript vue.js vuetify.js


    【解决方案1】:

    您可以将以下类添加到v-col 标签:

    <v-col class="d-flex justify-center">
    ...
    </v-col>
    

    【讨论】:

      猜你喜欢
      • 2019-06-13
      • 2020-03-16
      • 1970-01-01
      • 2020-05-13
      • 2014-04-01
      • 2020-04-20
      • 2019-02-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多