خاصية CSS grid-auto-أعمدة
مثال
عيّن حجمًا افتراضيًا للأعمدة في الشبكة:
.grid-container {
display: grid;
grid-auto-columns: 50px;
}
التعريف والاستخدام
تعيّن grid-auto-columns
الخاصية حجمًا للأعمدة في حاوية الشبكة.
تؤثر هذه الخاصية فقط على الأعمدة التي لم يتم تعيين الحجم.
القيمة الافتراضية: | تلقاءي |
---|---|
وارث: | رقم |
متحرك: | نعم. اقرأ عن animatable |
الإصدار: | وحدة تخطيط شبكة CSS المستوى 1 |
بناء جملة JavaScript: | الكائن .style.gridAutoColumns = "120px" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
Property | |||||
---|---|---|---|---|---|
grid-auto-columns | 57 | 16 | 52 | 10 | 44 |
بنية CSS
grid-auto-columns: auto|max-content|min-content|length;
قيم الملكية
Value | Description | Play it |
---|---|---|
auto | Default value. The size of the columns is determined by the size of the container | |
fit-content() | ||
max-content | Sets the size of each column depending on the largest item in the column | |
min-content | Sets the size of each column depending on the smallest item in the column | |
minmax(min.max) | Sets a size range greater than or equal to min and less than or equal to max | |
length | Sets the size of the columns, by using a legal length value. Read about length units | |
% | Sets the size of the columns, by using a percent value |
الصفحات ذات الصلة
دروس CSS: تخطيط شبكة CSS
مرجع CSS: خاصية الشبكة - auto-rows