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