2024-09-21
注意,这里的flex布局用的是tailwindcss的flex类,而不是css的flex属性。道理是一样的,只是写法不同。
实践下来,发现flex flex-row是默认的,不用写也可以。
<div class="flex flex-row">
<div>01</div>
<div>02</div>
<div>03</div>
</div>
<div class="flex flex-row-reverse">
<div>01</div>
<div>02</div>
<div>03</div>
</div>
<div class="flex justify-center">
<div>01</div>
<div>02</div>
<div>03</div>
</div>
<div class="flex justify-between">
<div>01</div>
<div>02</div>
<div>03</div>
</div>
<div class="flex flex-col">
<div>01</div>
<div>02</div>
<div>03</div>
</div>
<div class="flex flex-col-reverse">
<div>01</div>
<div>02</div>
<div>03</div>
</div>
<div class='flex'>
<div class='flex-1'>01</div>
<div class='flex-1'>02</div>
<div class='flex-1'>03</div>
</div>
https://tailwindcss.com/docs/flex-direction https://tailwindcss.com/docs/flex#flex-1