המאפיין grid-auto-rows
מגדיר את גודל השורות שנוספות אוטומטית כאשר מספר השורות בתבנית ה-Grid משתנה.
size
- גודל השורות האוטומטיות, לדוגמה 100px
, 1fr
וכו'.להלן דוגמה לשימוש במאפיין grid-auto-rows
:
<style>
.container {
display: grid;
grid-template-rows: repeat(2, 1fr);
grid-auto-rows: 100px;
gap: 10px;
}
.item {
background-color: lightblue;
padding: 20px;
}
</style>
<div class="container">
<div class="item">אלמנט 1</div>
<div class="item">אלמנט 2</div>
<div class="item">אלמנט 3</div>
</div>
רק רגע