ပုံစံ textTransform Property
ဥပမာ
ဒြပ်စင်တစ်ခုတွင် စကားလုံးတစ်လုံးစီ၏ ပထမအက္ခရာကို စာလုံးကြီးအဖြစ် ပြောင်းပါ-
document.getElementById("demo").style.textTransform = "capitalize";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
textTransform ပိုင်ဆိုင်မှုသည် စာသားတစ်ခု၏ စာလုံးအကြီးကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
စာသားကို အကြီး၊ အသေး သို့မဟုတ် စာလုံးကြီးအဖြစ် ပြောင်းလဲရန် ဤပိုင်ဆိုင်မှုကို အသုံးပြုသည်။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
textTransform | Yes | Yes | Yes | Yes | Yes |
အထားအသို
textTransform ပိုင်ဆိုင်မှုကို ပြန်ပေးပါ-
object.style.textTransform
textTransform ပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
object.style.textTransform = "none|capitalize|uppercase|lowercase|initial|inherit"
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
none | No characters are transformed. This is default |
capitalize | The first character of each word is transformed to uppercase |
uppercase | All characters are transformed to uppercase |
lowercase | All characters are transformed to lowercase |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
နည်းပညာဆိုင်ရာအသေးစိတ်
မူလတန်ဖိုး: | မရှိ |
---|---|
ပြန်ပို့တန်ဖိုး- | ဒြပ်စင်ရှိ စာသားအသွင်ပြောင်းခြင်းကို ကိုယ်စားပြုသော စာကြောင်းတစ်ခု |
CSS ဗားရှင်း | CSS1 |
နောက်ထပ် ဥပမာများ
ဥပမာ
ဒြပ်စင်တစ်ခုရှိ ဇာတ်ကောင်အားလုံးကို စာလုံးအကြီးအဖြစ် ပြောင်းပါ-
document.getElementById("demo").style.textTransform = "uppercase";
ဥပမာ
ဒြပ်စင်တစ်ခု၏ စာသားအသွင်ပြောင်းမှုကို ပြန်ပေးပါ။
alert(document.getElementById("demo").style.textTransform);
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS စာသား
CSS ရည်ညွှန်းချက်- စာသားအသွင်ပြောင်းခြင်း ပိုင်ဆိုင်မှု
❮ စတိုင်အရာဝတ္ထု