CSS ကလစ်လမ်းကြောင်း ပိုင်ဆိုင်မှု
ဥပမာ
ပုံတစ်ပုံကို 50% စက်ဝိုင်းသို့ ညှပ်ပါ-
img {
clip-path:
circle(50%);
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ပိုင်ဆိုင်မှု သည် clip-path
သင့်အား အခြေခံပုံသဏ္ဍာန်တစ်ခု သို့မဟုတ် SVG အရင်းအမြစ်သို့ ဒြပ်စင်တစ်ခုကို ကလစ်လုပ်ခွင့်ပေးသည်။
မှတ်ချက်-clip-path
ပိုင်ဆိုင်မှုသည် ကန့်ကွက်ထားသောပိုင်ဆိုင်မှုကို အစားထိုး ပါမည် clip
။
မူလတန်ဖိုး: | မရှိ |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | အခြေခံပုံသဏ္ဍာန် အတွက် ဟုတ်ပါတယ် ။ ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS Masking Module အဆင့် ၁ |
JavaScript syntax- | အရာဝတ္ထု .style.clipPath="circle(50%)" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
clip-path | 55.0 23.0 -webkit- |
79.0* | 54.0 | 9.1 6.1 -webkit- |
42.0 15.0 -webkit- |
* ဗားရှင်း 79 မတိုင်မီ၊ Edge သည် SVG ဒြပ်စင်များ (HTML ဒြပ်စင်များမဟုတ်) တွင် ကလစ်လမ်းကြောင်းကို ပံ့ပိုးထားသည်။
CSS Syntax
clip: clip-source|basic-shape|margin-box|border-box|padding-box|content-box|fill-box|stroke-box|view-box|none|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
clip-source | Defines a URL to an SVG <clipPath> element | |
basic-shape | Clips an element to a basic shape: circle, ellipse, polygon or inset | |
margin-box | Uses the margin box as the reference box | |
border-box | Uses the border box as the reference box | |
padding-box | Uses the padding box as the reference box | |
content-box | Uses the content box as the reference box | |
fill-box | Uses the object bounding box as reference box | |
stroke-box | Uses the stroke bounding box as reference box | |
view-box | Uses the SVG viewport as reference box | |
none | This is default. No clipping is done | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |