CSS နောက်ခံ- ပူးတွဲပါ ပစ္စည်းဥစ္စာ
ဥပမာ
စာမျက်နှာနှင့်အတူ လှိမ့်မည်မဟုတ်သော နောက်ခံပုံ (ပုံသေ)။
body {
background-image: url("img_tree.gif");
background-repeat: no-repeat;
background-attachment: fixed;
}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
စာမျက်နှာ ၏ background-attachment
ကျန်စာမျက်နှာနှင့်အတူ နောက်ခံပုံတစ်ပုံကို ရွှေ့ခြင်းရှိမရှိ ပိုင်ဆိုင်မှုက သတ်မှတ်ပေးသည်။
မူလတန်ဖိုး: | ပုရပိုက် |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS1 |
JavaScript syntax- | အရာဝတ္ထု .style.backgroundAttachment="fixed" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
background-attachment | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
CSS Syntax
background-attachment: scroll|fixed|local|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
scroll | The background image will scroll with the page. This is default |
fixed | The background image will not scroll with the page |
local | The background image will scroll 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 |
နောက်ထပ် ဥပမာများ
ဥပမာ
စာမျက်နှာ (scroll) ဖြင့် လှိမ့်မည့် နောက်ခံပုံ။ ၎င်းသည် မူရင်းဖြစ်သည်-
body {
background-image: url("img_tree.gif");
background-repeat: no-repeat;
background-attachment: scroll;
}
ဥပမာ
ရိုးရှင်းသော parallax scrolling effect ကိုဖန်တီးနည်း (3D အတိမ်အနက်ကို ထင်ယောင်ထင်မှားဖန်တီးခြင်း)။
.fixed-bg {
/* The background image */
background-image: url("img_tree.gif");
/* Set a specified height, or the minimum height for the background image */
min-height: 500px;
/* Set background image to fixed (don't scroll along with the page) */
background-attachment: fixed;
/* Center the background image */
background-position: center;
/* Set the background image to no repeat */
background-repeat: no-repeat;
/* Scale the background image to be as large as possible */
background-size: cover;
}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS နောက်ခံ
HTML DOM ရည်ညွှန်းချက်- နောက်ခံ ပူးတွဲပါပိုင်ဆိုင်မှု