As @Saddy mentioned, you need to reduce the number of rows to 1 in addition to setting the columns to 2.
<div class="container grid items-center max-w-6xl px-2 py-2 mx-auto bg-yellow-100 md:grid-cols-2 md:grid-rows-1 xs:grid-rows-2">
As a side note, you can also omit sm:grid-rows-2
and lg:grid-cols-2
as the changes get applied from the given breakpoint onwards (e.g., using md:
will also apply to lg:
and xl:
breakpoints).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…