सीएसएस क्लिप-पथ संपत्ति
उदाहरण
एक छवि को 50% सर्कल में क्लिप करें:
img {
clip-path:
circle(50%);
}
परिभाषा और उपयोग
clip-path
संपत्ति आपको किसी तत्व को मूल आकार या एसवीजी स्रोत पर क्लिप करने देती है ।
नोट: संपत्ति बहिष्कृत संपत्ति का clip-path
स्थान लेगी clip
।
डिफ़ॉल्ट मान: | कोई नहीं |
---|---|
विरासत में मिला: | नहीं |
एनिमेटेबल: | हाँ बुनियादी आकार के लिए । एनिमेटेबल के बारे में पढ़ें |
संस्करण: | सीएसएस मास्किंग मॉड्यूल स्तर 1 |
जावास्क्रिप्ट सिंटैक्स: | ऑब्जेक्ट .style.clipPath = "सर्कल (50%)" |
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
Property | |||||
---|---|---|---|---|---|
clip-path | 55.0 23.0 -webkit- |
79.0* | 54.0 | 9.1 6.1 -webkit- |
42.0 15.0 -webkit- |
* संस्करण 79 से पहले, एज केवल एसवीजी तत्वों (एचटीएमएल तत्व नहीं) पर क्लिप-पथ का समर्थन करता था।
सीएसएस सिंटेक्स
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 |