ပုံစံ boxSizing Property
ဥပမာ
boxSizing property ကိုပြောင်းပါ
document.getElementById("myDIV").style.boxSizing = "border-box";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
boxSizing ပိုင်ဆိုင်မှုသည် သင့်အား ဧရိယာတစ်ခုနှင့်ကိုက်ညီစေရန် အချို့သောဒြပ်စင်များကို သတ်မှတ်ရန်ခွင့်ပြုသည်။
ဥပမာအားဖြင့်၊ သင်သည် ဘေးချင်းကပ်လျက် ဘောင်နှစ်ခုကို လိုချင်ပါက၊ ၎င်းကို "border-box" ဟု သတ်မှတ်ခြင်းအားဖြင့် ၎င်းကို အောင်မြင်နိုင်သည်။ ၎င်းသည် ဘရောက်ဆာအား သတ်မှတ်ထားသော အကျယ်နှင့် အမြင့်ဖြင့် အကွက်ကို ပြန်ဆိုရန် တွန်းအားပေးပြီး ဘောင်နှင့် အကွက်များကို အကွက်အတွင်း ထည့်ပါ။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
boxSizing | Yes | Yes | Yes | Yes | Yes |
အထားအသို
boxSizing property ကို ပြန်ပေးပါ။
object.style.boxSizing
boxSizing property ကို သတ်မှတ်ပါ ။
object.style.boxSizing = "content-box|border-box|initial|inherit"
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
content-box | Default value. This is the behavior of width and height as specified by CSS2.1. The specified width and height (and min/max properties) apply to the width and height respectively of the content box of the element. The padding and border of the element are laid out and drawn outside the specified width and height |
border-box | The specified width and height (and min/max properties) on this element determine the border box of the element. That is, any padding or border specified on the element is laid out and drawn inside this specified width and height. The content width and height are calculated by subtracting the border and padding widths of the respective sides from the specified 'width' and 'height' properties |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
နည်းပညာဆိုင်ရာအသေးစိတ်
မူလတန်ဖိုး: | အကြောင်းအရာ-အကွက် |
---|---|
ပြန်ပို့တန်ဖိုး- | ဒြပ်စင်တစ်ခု၏ အကွက်အရွယ်အစားကို ကိုယ်စားပြုသည့် စာကြောင်းတစ်ခု |
CSS ဗားရှင်း | CSS3 |
ဆက်စပ်စာမျက်နှာများ
CSS ရည်ညွှန်းချက်- အကွက်အရွယ်အစား ပိုင်ဆိုင်မှု
❮ စတိုင်အရာဝတ္ထု