Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

responsive layout with vuetify

i have a layout which each row has 4 divs, now in mobile i want to change 4 divs to 2 divs like image

enter image description here

here is my code

<v-layout wrap align-center>
    <v-flex
        v-for="n in 10  "
           :key="n"
           xs3
           >
           <p>testtttt</p>
     </v-flex>
</v-layout>

Example from Vuetify https://codepen.io/thanhtungvo/pen/Padagq?&editors=100 current there are 3 images, how to change 2 images and keep the max-width in mobile version(responsive) Thanks

like image 698
Vo Thanh Tung Avatar asked Dec 23 '22 06:12

Vo Thanh Tung


1 Answers

thanks for Vuetify, it can be fixed like that

<v-flex
  v-for="i in 4 "
    :key="i"
     xs6
     md3
>

xs6: for small screen
md3: for medium screen
other metrics can check on the document https://vuetifyjs.com/en/layout/display

like image 167
Vo Thanh Tung Avatar answered Jan 02 '23 14:01

Vo Thanh Tung