<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>
mask
attribute is a presentation attribute mainly used to bind a given
<mask>
element with the element the attribute belongs to.
注意:
As a presentation attribute
mask
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 200 100" xmlns="http://www.w3.org/2000/svg">
<mask id="myMask" maskContentUnits="objectBoundingBox">
<rect fill="white" x="0" y="0" width="100%" height="100%" />
<polygon fill="black" points="0.5,0.2 0.68,0.74 0.21,0.41 0.79,0.41 0.32,0.74" />
</mask>
<!--
Punch a hole in a shape of a star inside the red circle,
revealing the yellow circle underneath
-->
<circle cx="50" cy="50" r="20" fill="yellow" />
<circle cx="50" cy="50" r="45" fill="red"
mask="url(#myMask)"/>
</svg>
Since SVG2, the
mask
attribute is defined as a css property and is a shorthand for many other properties:
mask-image
,
mask-mode
,
mask-repeat
,
mask-position
,
mask-clip
,
mask-origin
,
mask-size
,和
mask-composite
.
| 值 |
See the CSS property
mask
|
|---|---|
| 默认值 |
none
|
| Animatable | Yes |
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Masking Module Level 1
The definition of 'mask' in that specification. |
候选推荐 |
Extends its usage to HTML elements.
Extends its syntax by making it a shorthand for the new
mask-*
properties defined in that
规范。
|
|
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'mask' in that specification. |
推荐 | 初始定义 |
BCD tables only load in the browser
最后修改: , 由 MDN 贡献者