خاصية محاذاة الذات في CSS
مثال
توسيط المحاذاة لأحد العناصر داخل عنصر مرن:
#myBlueDiv
{
align-self: center;
}
التعريف والاستخدام
تحدد الخاصية محاذاة العنصر align-self
المحدد داخل الحاوية المرنة.
ملاحظة: تتجاوز align-self
الخاصية خاصية
align-items للحاوية المرنة .
القيمة الافتراضية: | تلقاءي |
---|---|
وارث: | رقم |
متحرك: | رقم. اقرأ عن animatable |
الإصدار: | CSS3 |
بناء جملة JavaScript: | الكائن .style.alignSelf = "المركز" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
الأرقام متبوعة بـ -webkit- تحدد الإصدار الأول الذي يعمل بالبادئة.
Property | |||||
---|---|---|---|---|---|
align-self | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
بنية CSS
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
قيم الملكية
Value | Description | Play it |
---|---|---|
auto | Default. The element inherits its parent container's align-items property, or "stretch" if it has no parent container | |
stretch | The element is positioned to fit the container | |
center | The element is positioned at the center of the container | |
flex-start | The element is positioned at the beginning of the container | |
flex-end | The element is positioned at the end of the container | |
baseline | The element is positioned at the baseline of the container | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
الصفحات ذات الصلة
مرجع CSS: خاصية محاذاة المحتوى
مرجع CSS: خاصية محاذاة العناصر
مرجع HTML DOM: خاصية alignSelf