<div class="grid">
<div class="grid-cell">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dignissimos, sed, sunt consectetur reiciendis vitae illo id expedita provident dolore tenetur eos dolor cupiditate perspiciatis hic necessitatibus rem vel molestiae laboriosam nulla alias eum sapiente eaque quas asperiores ratione architecto corporis.</div>
<div class="grid-cell">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas, autem!</div>
</div>
1条答案
按热度按时间o4hqfura1#
这可以通过
auto-fit
和minmax()
来实现。在下面的示例中,当容器的宽度小于
400px
+grid-gap
时,列移动到下一行: