ပုံစံ နောက်ခံ တွယ်တာပစ္စည်းပိုင်ဆိုင်မှု
ဥပမာ
နောက်ခံပုံအား ပြုပြင်ရန် သတ်မှတ်ပါ (ရွှေ့မည်မဟုတ်ပါ)။
document.body.style.backgroundAttachment = "fixed";
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
နောက်ခံပုံတစ်ပုံသည် အကြောင်းအရာနှင့်အတူ လှိမ့်သင့်သည် သို့မဟုတ် ပြင်ဆင်ခြင်းရှိ၊
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
backgroundAttachment | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
အထားအသို
နောက်ခံ ပူးတွဲပိုင်ဆိုင်မှုကို ပြန်ပေးပါ-
object.style.backgroundAttachment
နောက်ခံ ပူးတွဲပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
object.style.backgroundAttachment = "scroll|fixed|local|initial|inherit"
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
scroll | The background scrolls along with the element. This is default |
fixed | The background is fixed with regard to the viewport |
local | The background scrolls along with the element's contents |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
နည်းပညာဆိုင်ရာအသေးစိတ်
မူလတန်ဖိုး: | ပုရပိုက် |
---|---|
ပြန်ပို့တန်ဖိုး- | စာရွက်စာတမ်းအတွင်းရှိ အရာဝတ္ထုနှင့် နောက်ခံပုံအား မည်ကဲ့သို့ ချိတ်ဆက်ပုံကို ကိုယ်စားပြုသော စာတန်း |
CSS ဗားရှင်း | CSS1 |
နောက်ထပ် ဥပမာများ
ဥပမာ
DIV ဒြပ်စင်တစ်ခုပေါ်ရှိ scroll နှင့် local အကြားရွေးချယ်ပါ-
document.getElementById("myDIV").style.backgroundAttachment = "local";
ဥပမာ
scroll နှင့် fixed အကြားပြောင်းရန်-
var x = document.body.style.backgroundAttachment;
document.body.style.backgroundAttachment = (x == "scroll")? "fixed":"scroll";
ဥပမာ
နောက်ခံ-ပူးတွဲပါပိုင်ဆိုင်မှု၏တန်ဖိုးကို ပြန်ပေးပါ-
alert(document.body.style.backgroundAttachment);
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS နောက်ခံ
CSS ရည်ညွှန်းချက်- နောက်ခံ- ပူးတွဲပါ ပစ္စည်းပိုင်ဆိုင်မှု
HTML DOM ရည်ညွှန်းချက်- နောက်ခံပိုင်ဆိုင်မှု