Style အောက်ခြေ Property
ဥပမာ
<button> ဒြပ်စင်တစ်ခု၏ အောက်ခြေအနေအထားကို သတ်မှတ်ပါ-
document.getElementById("myBtn").style.bottom = "100px";
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
အောက်ခြေပိုင်ဆိုင်မှုသည် နေရာချထားသော ဒြပ်စင်တစ်ခု၏ အောက်ခြေအနေအထားကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
ဤပိုင်ဆိုင်မှုသည် padding၊ scrollbar၊ border နှင့် margin အပါအဝင် element ၏အောက်ခြေအနေအထားကို သတ်မှတ်ပေးပါသည်။
အကြံပြုချက်- နေရာချထားသောဒြပ်စင်သည် ဆွေမျိုး၊ အကြွင်းမဲ့ သို့မဟုတ် ပုံသေသတ်မှတ်ထားသည့် အနေအထားပိုင်ဆိုင်မှုပါရှိသော ဒြပ်စင်တစ်ခုဖြစ်သည်။
အကြံပြုချက်- နေရာချထားသော ဒြပ်စင်တစ်ခု၏ ထိပ်တန်းအနေအထားကို သတ်မှတ်ရန် သို့မဟုတ် ပြန်ပေးရန်၊ ထိပ်တန်း ပိုင်ဆိုင်မှုကို အသုံးပြုပါ။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
bottom | Yes | Yes | Yes | Yes | Yes |
အထားအသို
အောက်ခြေပိုင်ဆိုင်မှုကို ပြန်ပေးပါ-
object.style.bottom
အောက်ခြေပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
object.style.bottom = "auto|length|%|initial|inherit"
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
auto | Lets the browser set the bottom position. This is default |
length | Defines the bottom position in length units. Negative values are allowed |
% | Sets the bottom position in % of the height 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> ဒြပ်စင်တစ်ခု၏ အောက်ခြေအနေအထားကို သတ်မှတ်ပါ-
document.getElementById("myDiv").style.bottom = "10px";
ဥပမာ
အနှုတ်တန်ဖိုးများကို အသုံးပြုခြင်း - <div> ဒြပ်စင်တစ်ခု၏ အောက်ခြေအနေအထားကို သတ်မှတ်ပါ-
document.getElementById("myDiv").style.bottom = "-100px";
ဥပမာ
<div> ဒြပ်စင်တစ်ခု၏ အောက်ခြေအနေအထားကို ပြန်ပေးပါ။
alert(document.getElementById("myDiv").style.bottom);
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS နေရာချထား ခြင်း။
CSS ရည်ညွှန်းချက်- အောက်ခြေပိုင်ဆိုင်မှု
❮ စတိုင်အရာဝတ္ထု