CSS စာသား-ချိန်ညှိမှု ပိုင်ဆိုင်မှု
ဥပမာ
မတူညီသော <div> ဒြပ်စင်များအတွက် စာသားချိန်ညှိမှုကို သတ်မှတ်ပါ-
div.a {
text-align: center;
}
div.b {
text-align: left;
}
div.c {
text-align: right;
}
div.c {
text-align:
justify;
}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှုသည် ဒြပ်စင်တစ်ခုရှိ စာသား ၏ text-align
အလျားလိုက် ချိန်ညှိမှုကို သတ်မှတ်သည်။
မူလတန်ဖိုး: | ဦးတည်ချက်သည် ltr ဖြစ်လျှင် ဘယ်ဘက်၊ လမ်းကြောင်းသည် rtl ဖြစ်လျှင် ညာဘက် |
---|---|
အမွေဆက်ခံသည်- | ဟုတ်တယ် |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS1 |
JavaScript syntax- | အရာဝတ္ထု .style.textAlign="right" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
text-align | 1.0 | 3.0 | 1.0 | 1.0 | 3.5 |
CSS Syntax
text-align: left|right|center|justify|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
left | Aligns the text to the left | |
right | Aligns the text to the right | |
center | Centers the text | |
justify | Stretches the lines so that each line has equal width (like in newspapers and magazines) | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
နောက်ထပ် ဥပမာများ
ဥပမာ
နောက်ထပ် စာသားညှိခြင်း ဥပမာ-
h1 {
text-align: center;
}
p.date {
text-align: right;
}
p.main {
text-align: justify;
}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS စာသား
HTML DOM ရည်ညွှန်းချက်- textAlign ပိုင်ဆိုင်မှု