نمط الملكية flexBasis
مثال
اضبط الطول الأولي لعنصر فليكس على 200 بكسل:
document.getElementById("myBlueDiv").style.flexBasis = "200px";
التعريف والاستخدام
تحدد الخاصية flexBasis الطول الأولي للعنصر المرن.
ملاحظة: إذا لم يكن العنصر عنصرًا مرنًا ، فلن يكون لخاصية flexBasis أي تأثير.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
flexBasis | Yes | 11.0 | Yes | 9.0 | Yes |
بناء الجملة
إعادة خاصية flexBasis:
object.style.flexBasis
قم بتعيين خاصية flexBasis:
object.style.flexBasis = "number|auto|initial|inherit"
قيم الملكية
Value | Description |
---|---|
number | A length unit, or percentage, specifying the initial length of the flexible item(s) |
auto | Default value. The length is equal to the length of the flexible item. If the item has no length specified, the length will be according to its content |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
تفاصيل تقنية
القيمة الافتراضية: | تلقاءي |
---|---|
قيمة الإرجاع: | سلسلة ، تمثل الخاصية المرنة لعنصر |
إصدار CSS | CSS3 |
الصفحات ذات الصلة
مرجع CSS: خاصية الأساس المرن
مرجع HTML DOM STYLE: الخاصية المرنة
مرجع HTML DOM STYLE: خاصية flexDirection
مرجع HTML DOM STYLE: خاصية flexFlow
مرجع HTML DOM STYLE: خاصية flexGrow
مرجع HTML DOM STYLE: خاصية flexShrink
مرجع HTML DOM STYLE: خاصية flexWrap
❮ نمط الكائن