2 개의 열이있는 레이아웃을 만들려고합니다. 높이가 같고 내부 내용이 세로로 중앙에 배치되어야합니다.
다음은 vuetify의 코드입니다.
<div id="app">
<v-app>
<v-row align="center">
<v-col cols=6 style="background-color: #FF5000;" align="center">
<v-btn class="m">Column 1</v-btn>
</v-col>
<v-col cols=6 style="background-color: #5fc3c7;">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</v-col>
</v-row>
</v-app>
</div>
내가 변화 시도 <v-row align="center">
에 <v-row align="stretch">
열 내가 원하는대로 스트레치하지만 내용이 중심되지 않습니다 ..
으로 Tingsen 쳉이 언급 한, 당신은 당신의 플렉스 스타일을 추가 할 수 있습니다 v-col
수직 중심을 달성하기 위해. 또한 Vuetify 2.3.10부터는 레이아웃을 쉽게 제어 할 수있는 유틸리티 클래스를 제공 하는 flex 도우미 를 사용할 수 있습니다 .
따라서 inline을 사용하는 대신 style
다음과 같이 사용할 수 있습니다.class="d-flex justify-center align-center"
<v-row align="stretch">
<v-col
cols="6"
style="background-color: #FF5000;"
class="d-flex justify-center align-center"
>
<v-btn>...</v-btn>
</v-col>
<v-col cols="6" style="background-color: #5fc3c7;">...</v-col>
</v-row>
다음은 codesandbox 의 데모 입니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다