CSS klip yolu Özellik
Örnek
Bir resmi %50'lik bir daireye kırpın:
img {
clip-path:
circle(50%);
}
Tanım ve Kullanım
Özellik , clip-path
bir öğeyi temel bir şekle veya bir SVG kaynağına kırpmanıza olanak tanır.
Not: Özellik clip-path
, kullanımdan kaldırılan clip
mülkün yerini alacaktır.
Varsayılan değer: | Yok |
---|---|
Miras: | Hayır |
canlandırılabilir: | evet temel şekil için . Canlandırılabilir hakkında bilgi edinin |
Sürüm: | CSS Maskeleme Modülü Seviye 1 |
JavaScript sözdizimi: | nesne .style.clipPath="daire(%50)" |
Tarayıcı Desteği
Tablodaki sayılar, özelliği tam olarak destekleyen ilk tarayıcı sürümünü belirtir.
Property | |||||
---|---|---|---|---|---|
clip-path | 55.0 23.0 -webkit- |
79.0* | 54.0 | 9.1 6.1 -webkit- |
42.0 15.0 -webkit- |
* Sürüm 79'dan önce, Edge yalnızca SVG öğelerinde (HTML öğelerinde değil) klip yolunu destekliyordu.
CSS Sözdizimi
clip: clip-source|basic-shape|margin-box|border-box|padding-box|content-box|fill-box|stroke-box|view-box|none|initial|inherit;
Mülk değerleri
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 |