18
11

More than 5 years have passed since last update.

vuetifyでcard内のavatarを中心に持ってくる

Posted at

card内でavatarを使う

avatarをv-card内で使うと、画像が中心に持ってくるのが難しい

<v-card>
  <v-avatar
    size="50%"
  >
  <img src="画像データ">
  </v-avatar>
</v-card>

text-xs-centerjustify-center をavatarや画像につけたり
maring: 0 auto;をしてみても中心に持ってこれない

解決策

<v-layout>justify-center を使うと画像を中心に持ってくることができる

<v-card>
  <v-layout justify-center>
   <v-avatar
    size="50%
   >
    <img src="画像データ">
   </v-avatar>
  </v-layout>
</v-card>
18
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
11