ပုံစံ ကို အကြောင်းပြပြီး အကြောင်းအရာ ပိုင်ဆိုင်မှု
ဥပမာ
ပြောင်းလွယ်ပြင်လွယ် <div> ဒြပ်စင်၏ အရာများကြားတွင် နေရာအနည်းငယ် ပြုလုပ်ပါ-
document.getElementById("main").style.justifyContent = "space-between";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပင်မဝင်ရိုးပေါ်ရှိ နေရာအားလုံး (အလျားလိုက်) ကို အသုံးမပြုသည့်အခါ justifyContent ပိုင်ဆိုင်မှုသည် ပြောင်းလွယ်ပြင်လွယ်ရှိသော ကွန်တိန်နာ၏ပစ္စည်းများကို ချိန်ညှိပေးပါသည်။
အကြံပြုချက်- ဝင်ရိုးဖြတ်ပိုင်း (ဒေါင်လိုက်) ပေါ်ရှိ အရာများကို ချိန်ညှိရန် alignContent ပိုင်ဆိုင်မှုကို အသုံးပြုပါ။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
justifyContent | Yes | 12.0 | Yes | 9.0 | Yes |
အထားအသို
မျှတသောအကြောင်းအရာပိုင်ဆိုင်မှုကို ပြန်ပေးပါ-
object.style.justifyContent
မျှတသောအကြောင်းအရာပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
object.style.justifyContent = "flex-start|flex-end|center|space-between|space-around|initial|inherit"
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
flex-start | Default value. Items are positioned at the beginning of the container |
flex-end | Items are positioned at the end of the container |
center | Items are positioned at the center of the container |
space-between | Items are positioned with space between the lines |
space-around | Items are positioned with space before, between, and after the lines |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
နည်းပညာဆိုင်ရာအသေးစိတ်
မူလတန်ဖိုး: | flex-စတင် |
---|---|
ပြန်ပို့တန်ဖိုး- | ဒြပ်စင်တစ်ခု၏ တရားမျှတသော အကြောင်းအရာပိုင်ဆိုင်မှုကို ကိုယ်စားပြုသည့် စာကြောင်းတစ်ခု |
CSS ဗားရှင်း | CSS3 |
ဆက်စပ်စာမျက်နှာများ
CSS ရည်ညွှန်းချက်- အကြောင်းအရာ ပိုင်ဆိုင်မှု
HTML DOM ပုံစံ အကိုးအကား- အကြောင်းအရာ ပိုင်ဆိုင်မှုကို ချိန်ညှိပါ ။
HTML DOM STYLE အကိုးအကား- alignItems ပိုင်ဆိုင်မှု
HTML DOM STYLE အကိုးအကား- မိမိကိုယ်ကို ပိုင်ဆိုင်မှုကို ညှိပါ ။
❮ စတိုင်အရာဝတ္ထု