CSS align-items Property
ဥပမာ
ပြောင်းလွယ်ပြင်လွယ် <div> ဒြပ်စင်၏ အရာများအားလုံးအတွက် ချိန်ညှိမှုများကို ဗဟိုပြုပါ-
div
{
display: flex;
align-items: center;
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှု သည် align-items
ပြောင်းလွယ်ပြင်လွယ်ရှိသော ကွန်တိန်နာအတွင်းရှိ အရာများအတွက် ပုံသေချိန်ညှိမှုကို သတ်မှတ်သည်။
အကြံပြုချက်- ပစ္စည်းတစ်ခုစီ ၏ align-self ပိုင်ဆိုင်မှု ကို အသုံးပြု၍ ပစ္စည်းကို အစားထိုးရန် align-items
။
မူလတန်ဖိုး: | ဆန့် |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS3 |
JavaScript syntax- | အရာဝတ္ထု .style.alignItems="center" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
နံပါတ်များ -webkit- နောက်တွင် ရှေ့ဆက်တွဲဖြင့် လုပ်ဆောင်သော ပထမဆုံးဗားရှင်းကို သတ်မှတ်ပါ။
Property | |||||
---|---|---|---|---|---|
align-items | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
CSS Syntax
align-items: stretch|center|flex-start|flex-end|baseline|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
stretch | Default. Items are stretched to fit the container | |
center | Items are positioned at the center of the container | |
flex-start | Items are positioned at the beginning of the container | |
flex-end | Items are positioned at the end of the container | |
baseline | Items are 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 အကိုးအကား- align-self ပိုင်ဆိုင်မှု
HTML DOM ရည်ညွှန်းချက်- alignItems ပိုင်ဆိုင်မှု