CSS white-space Property
ဥပမာ
white-space property ၏ မတူညီသောတန်ဖိုးများကို သရုပ်ပြပါ-
p.a {
white-space: nowrap;
}
p.b {
white-space: normal;
}
p.c {
white-space:
pre;
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှု သည် white-space
ဒြပ်စင်တစ်ခုအတွင်းရှိ white-space ကို မည်ကဲ့သို့ ကိုင်တွယ်သည်ကို သတ်မှတ်သည်။
မူလတန်ဖိုး: | ပုံမှန် |
---|---|
အမွေဆက်ခံသည်- | ဟုတ်တယ် |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS1 |
JavaScript syntax- | အရာဝတ္ထု .style.whiteSpace="nowrap" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
white-space | 1.0 | 8.0 | 3.5 | 3.0 | 9.5 |
CSS Syntax
white-space: normal|nowrap|pre|pre-line|pre-wrap|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
normal | Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default | |
nowrap | Sequences of whitespace will collapse into a single whitespace. Text will never wrap to the next line. The text continues on the same line until a <br> tag is encountered | |
pre | Whitespace is preserved by the browser. Text will only wrap on line breaks. Acts like the <pre> tag in HTML | |
pre-line | Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary, and on line breaks | |
pre-wrap | Whitespace is preserved by the browser. Text will wrap when necessary, and on line breaks | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS စာသား
HTML DOM ရည်ညွှန်းချက်- whiteSpace ပိုင်ဆိုင်မှု