CSS မျက်နှာဖုံး-ရာထူး ပိုင်ဆိုင်မှု
ဥပမာ
မျက်နှာဖုံးအလွှာပုံ၏ တည်နေရာကို ဗဟိုသို့ သတ်မှတ်ပါ-
.mask1 {
-webkit-mask-image: url(w3logo.png);
mask-image: url(w3logo.png);
-webkit-mask-size: 50%;
mask-size: 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position: center;
mask-position: center;
}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှုသည် မျက်နှာဖုံးပုံတစ်ခု၏ အ mask-position
စအနေအထား (မျက်နှာဖုံးအနေအထားဧရိယာနှင့် ဆက်စပ်မှု) ကို သတ်မှတ်ပေးသည်။
အကြံပြုချက်- ပုံမှန်အားဖြင့်၊ မျက်နှာဖုံးပုံတစ်ပုံကို ဒြပ်စင်တစ်ခု၏ ဘယ်ဘက်အပေါ်ထောင့်တွင် ထားရှိကာ ဒေါင်လိုက်နှင့် အလျားလိုက် နှစ်ခုစလုံးကို ထပ်ခါတလဲလဲ ပြုလုပ်ထားသည်။
မူလတန်ဖိုး: | ၀% ၀% |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS3 |
JavaScript syntax- | အရာဝတ္ထု .style.maskPosition="100px စင်တာ" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
နံပါတ်များ -webkit- နောက်တွင် ရှေ့ဆက်တွဲဖြင့် လုပ်ဆောင်သော ပထမဆုံးဗားရှင်းကို သတ်မှတ်ပါ။
Property | |||||
---|---|---|---|---|---|
mask-position | 4.0 -webkit- | 79.0 -webkit- | 53.0 | 4.0 -webkit- | 15.0 -webkit- |
CSS Syntax
mask-position: value;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
left top left center left bottom right top right center right bottom center top center center center bottom |
If you only specify one keyword, the other value will be "center" |
x% y% | The first value is the horizontal position and the second value is the vertical. The top left corner is 0% 0%. The right bottom corner is 100% 100%. If you only specify one value, the other value will be 50%. Default value is: 0% 0% |
xpos ypos | The first value is the horizontal position and the second value is the vertical. The top left corner is 0 0. Units can be pixels (0px 0px) or any other CSS units. If you only specify one value, the other value will be 50%. You can mix % and positions |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
နောက်ထပ် ဥပမာများ
ဥပမာ
မျက်နှာဖုံးအလွှာပုံ၏ တည်နေရာကို ညာဘက်အောက်ခြေထောင့်တွင် သတ်မှတ်ပါ-
.mask1 {
-webkit-mask-image: url(w3logo.png);
mask-image: url(w3logo.png);
-webkit-mask-size: 50%;
mask-size: 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position: 100% 100%;
mask-position: 100% 100%;
}
ဆက်စပ်စာမျက်နှာများ
CSS ရည်ညွှန်းချက်- မျက်နှာဖုံးပုံ ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- မျက်နှာဖုံးမုဒ် ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- မျက်နှာဖုံး-မူလပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- mask-repeat ပိုင်ဆိုင်မှု
CSS ရည်ညွှန်းချက်- မျက်နှာဖုံးအရွယ်အစား ပိုင်ဆိုင်မှု
CSS သင်ခန်းစာ- CSS Masking