I would like to have a css grid with cards, that are responsive and can grow and shrink as in these pictures:
So for this reason I have used minmax
css function:
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
However, if there are no more cards in list to be put in a single row, the existing cards grow to the limits of parent:
How can I give an upper limit for the minmax function?
Replace repeat(auto-fit, minmax(300px, 1fr))
with repeat(auto-fill, minmax(300px, 1fr))
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加