CSS Grid-template-rows property
مثال
حدد حجم الصف (الارتفاع):
.grid-container {
display: grid;
grid-template-rows:
100px 300px;
}
التعريف والاستخدام
تحدد الخاصية عدد grid-template-rows
الصفوف (والارتفاعات) في تخطيط الشبكة.
القيم عبارة عن قائمة مفصولة بمسافات ، حيث تحدد كل قيمة ارتفاع الصف المعني.
القيمة الافتراضية: | لا أحد |
---|---|
وارث: | رقم |
متحرك: | نعم. اقرأ عن animatable |
الإصدار: | وحدة تخطيط شبكة CSS المستوى 1 |
بناء جملة JavaScript: | الكائن .style.gridTemplateRows = "50px 200px" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
Property | |||||
---|---|---|---|---|---|
grid-template-rows | 57 | 16 | 52 | 10 | 44 |
بنية CSS
grid-template-rows: none|auto|max-content|min-content|length|initial|inherit;
قيم الملكية
Value | Description | Play it |
---|---|---|
none | No size is set. Rows are created if needed | |
auto | The size of the rows is determined by the size of the container, and on the size of the content of the items in the row | |
max-content | Sets the size of each row to depend on the largest item in the row | |
min-content | Sets the size of each row to depend on the smallest item in the row | |
length | Sets the size of the rows, by using a legal length value. Read about length units |
الصفحات ذات الصلة
دروس CSS: تخطيط شبكة CSS
مرجع CSS: خاصية أعمدة الشبكة
مرجع CSS: خاصية قالب الشبكة