ပုံစံ maxHeight အိမ်ခြံမြေ
ဥပမာ
<div> ဒြပ်စင်တစ်ခု၏ အမြင့်ဆုံးအမြင့်ကို သတ်မှတ်ပါ-
document.getElementById("myDIV").style.maxHeight = "15px";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
maxHeight ပိုင်ဆိုင်မှုသည် ဒြပ်စင်တစ်ခု၏အမြင့်ဆုံးအမြင့်ကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
maxHeight ပိုင်ဆိုင်မှုသည် ဘလောက်အဆင့်ဒြပ်စင်များ သို့မဟုတ် အကြွင်းမဲ့ သို့မဟုတ် ပုံသေအနေအထားရှိသော ဒြပ်စင်များပေါ်တွင်သာ သက်ရောက်မှုရှိသည်။
မှတ်ချက်- ဒြပ်စင်တစ်ခု၏ အမြင့်သည် maxHeight ပိုင်ဆိုင်မှုမှ သတ်မှတ်ထားသော တန်ဖိုးထက် ဘယ်သောအခါမှ မကြီးနိုင်ပါ။
အကြံပြုချက်- ဒြပ်စင်တစ်ခု၏ အနိမ့်ဆုံးအမြင့်ကို သတ်မှတ်ရန် သို့မဟုတ် ပြန်ပေးရန်၊ minHeight ပိုင်ဆိုင်မှုကို အသုံးပြုပါ။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
maxHeight | Yes | Yes | Yes | Yes | Yes |
အထားအသို
maxHeight ပိုင်ဆိုင်မှုကို ပြန်ပေးပါ။
object.style.maxHeight
maxHeight ကို သတ်မှတ်ပါ-
object.style.maxHeight = "none|length|%|initial|inherit"
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
none | No limit on the height of the element. This is default |
length | Defines the maximum height in length units |
% | Defines the maximum height in % of the parent element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
နည်းပညာဆိုင်ရာအသေးစိတ်
မူလတန်ဖိုး: | မရှိ |
---|---|
ပြန်ပို့တန်ဖိုး- | ဒြပ်စင်တစ်ခု၏ အမြင့်ဆုံးအမြင့်ကို ကိုယ်စားပြုသော စာကြောင်းတစ်ခု |
CSS ဗားရှင်း | CSS2 |
နောက်ထပ် ဥပမာများ
ဥပမာ
<div> ဒြပ်စင်တစ်ခု၏ အမြင့်ဆုံးအမြင့်ကို ပြန်ပေးပါ။
alert(document.getElementById("myDIV").style.maxHeight);
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS Dimension
CSS ရည်ညွှန်းချက်- အမြင့်ဆုံး-အမြင့် ပိုင်ဆိုင်မှု
❮ စတိုင်အရာဝတ္ထု