CSS z-index Property
ဥပမာ
ပုံတစ်ပုံအတွက် z-အညွှန်းကို သတ်မှတ်ပါ-
img
{
position: absolute;
left: 0px;
top: 0px;
z-index: -1;
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှု သည် z-index
ဒြပ်စင်တစ်ခု၏ stack အစီအစဉ်ကို သတ်မှတ်သည်။
အစုအစီအစဥ် ပိုကြီးသော ဒြပ်စင်တစ်ခုသည် အောက်ခြေအစီအစဥ်တစ်ခု၏ ရှေ့တွင် အမြဲရှိသည်။
မှတ်ချက်- z-index
နေရာချထားသော ဒြပ်စင်များ (အနေအထား- ပကတိ၊ အနေအထား- ဆွေမျိုး၊ အနေအထား- ပုံသေ၊ သို့မဟုတ် အနေအထား- စေးကပ်မှု) နှင့် ကန့်လန့်ဖြတ်အရာများ (
ပြသမှု-flex ဒြပ်စင်များ၏ တိုက်ရိုက်ကလေးများဖြစ်ကြသည့် အရာများ) တွင်သာ အလုပ်လုပ်သည်။
မှတ်ချက်- သတ်မှတ်ထားသော နေရာမရှိသော ဒြပ်စင်နှစ်ခု ထပ်နေပါက z-index
၊ HTML ကုဒ်တွင် နောက်ဆုံးနေရာချထားသည့် ဒြပ်စင်ကို အပေါ်ဆုံးတွင် ပြသပါမည်။
မူလတန်ဖိုး: | အော်တို |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | ဟုတ်တယ် ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS2 |
JavaScript syntax- | အရာဝတ္ထု .style.zIndex="-1" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
z-index | 1.0 | 4.0 | 3.0 | 1.0 | 4.0 |
CSS Syntax
z-index: auto|number|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
auto | Sets the stack order equal to its parents. This is default | |
number | Sets the stack order of the element. Negative numbers are allowed | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS နေရာချထား ခြင်း။
HTML DOM ရည်ညွှန်းချက်-
zIndex ပိုင်ဆိုင်မှု