<feBlend>
<feColorMatrix>
<feComponentTransfer>
<feComposite>
<feConvolveMatrix>
<feDiffuseLighting>
<feDisplacementMap>
<feDistantLight>
<feFlood>
<feFuncA>
<feFuncB>
<feFuncG>
<feFuncR>
<feGaussianBlur>
<feImage>
<feMerge>
<feMergeNode>
<feMorphology>
<feOffset>
<fePointLight>
<feSpecularLighting>
<feSpotLight>
<feTile>
<feTurbulence>
<filter>
<font>
<font-face>
<font-face-format>
<font-face-name>
<font-face-src>
<font-face-uri>
<foreignObject>
clip-path
presentation attribute defines or associates a clipping path with the element it is related to.
注意:
As a presentation attribute
clip-path
can be used as a CSS property.
You can use this attribute with the following SVG elements:
<a>
<circle>
<clipPath>
<ellipse>
<g>
<glyph>
<image>
<line>
<marker>
<mask>
<path>
<pattern>
<polygon>
<polyline>
<rect>
<svg>
<symbol>
<text>
<use>
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<clipPath id="myClip" clipPathUnits="objectBoundingBox">
<circle cx=".5" cy=".5" r=".5" />
</clipPath>
<!-- Top-left: Apply a custom defined clipping path -->
<rect x="1" y="1" width="8" height="8" stroke="green"
clip-path="url(#myClip)" />
<!-- Top-right: Apply a CSS basic shape on a fill-box
geometry. This is the same as having a custom clipping
path with a clipPathUnits set to objectBoundingBox -->
<rect x="11" y="1" width="8" height="8" stroke="green"
clip-path="circle() fill-box" />
<!-- Bottom-left -->
<rect x="1" y="11" width="8" height="8" stroke="green"
clip-path="circle() stroke-box" />
<!-- Bottom-right: Apply a CSS basic shape on a view-box
geometry. This is the same as having a custom clipping
path with a clipPathUnits set to userSpaceOnUse -->
<rect x="11" y="11" width="8" height="8" stroke="green"
clip-path="circle() view-box" />
</svg>
| 值 |
url()
| [
<basic-shape>
||
<geometry-box>
] |
none
|
|---|---|
| 默认值 |
none
|
| Animatable | Yes |
An extra information to tell how a
<basic-shape>
is applied to an element:
fill-box
indicates to use the object bounding box;
stroke-box
indicates to use the object bounding box extended with the stroke;
view-box
indicates to use the nearest SVG viewport as the reference box.
注意:
For more details on the clip-path syntax, see the CSS property
clip-path
reference page.
BCD tables only load in the browser
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Masking Module Level 1
The definition of 'clip-path' in that specification. |
候选推荐 |
Extends its application to HTML elements. The
clip-path
property replaces the deprecated
clip
特性。
|
|
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'clip-path' in that specification. |
推荐 | Initial definition (applies to SVG elements only). |
clip-path
property
最后修改: , 由 MDN 贡献者