ပုံစံ textAlign Property
ဥပမာ
အစိတ်အပိုင်းတစ်ခုရှိ စာသားကို အလယ်တည့်တည့်ချိန်ညှိပါ-
document.getElementById("demo").style.textAlign = "center";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
textAlign ပိုင်ဆိုင်မှုသည် ဘလောက်အဆင့်ဒြပ်စင်တစ်ခုတွင် စာသား၏အလျားလိုက် ချိန်ညှိမှုကို သတ်မှတ် သို့မဟုတ် ပြန်ပေးသည်။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
textAlign | Yes | Yes | Yes | Yes | Yes |
အထားအသို
textAlign ကို ပြန်ပို့ပါ-
object.style.textAlign
textAlign ကို သတ်မှတ်ခြင်း-
object.style.textAlign = "left|right|center|justify|initial|inherit"
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
left | Aligns the text to the left. This is default |
right | Aligns the text to the right |
center | Centers the text |
justify | The text is justified |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
နည်းပညာဆိုင်ရာအသေးစိတ်
မူလတန်ဖိုး: | ဝဲ |
---|---|
ပြန်ပို့တန်ဖိုး- | ဒြပ်စင်အတွင်း စာသား၏ အလျားလိုက် ချိန်ညှိမှုကို ကိုယ်စားပြုသော စာတန်း |
CSS ဗားရှင်း | CSS1 |
နောက်ထပ် ဥပမာများ
ဥပမာ
ဒြပ်စင်တစ်ခု၏ စာသားချိန်ညှိမှုကို ပြန်ပေးပါ။
alert(document.getElementById("demo").style.textAlign);
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS စာသား
CSS ရည်ညွှန်းချက်- စာသားချိန်ညှိမှု ပိုင်ဆိုင်မှု
❮ စတိုင်အရာဝတ္ထု