mask-mode - CSS: Cascading Style Sheets 编辑
The mask-mode
CSS property sets whether the mask reference defined by mask-image
is treated as a luminance or alpha mask.
/* Keyword values */
mask-mode: alpha;
mask-mode: luminance;
mask-mode: match-source;
/* Multiple values */
mask-mode: alpha, match-source;
/* Global values */
mask-mode: inherit;
mask-mode: initial;
mask-mode: unset;
Syntax
The mask-mode
property is specified as one or more of the keyword values listed below, separated by commas.
Values
alpha
- This keyword indicates that the transparency (alpha channel) values of the mask layer image should be used as the mask values.
luminance
- This keyword indicates that the luminance values of the mask layer image should be used as the mask values.
match-source
If the
mask-image
property is of type<mask-source>
, the luminance values of the mask layer image should be used as the mask values.If it is of type
<image>
, the alpha values of the mask layer image should be used as the mask values.
Formal definition
Initial value | match-source |
---|---|
Applies to | all elements; In SVG, it applies to container elements excluding the defs element and all graphics elements |
Inherited | no |
Computed value | as specified |
Animation type | discrete |
Formal syntax
<masking-mode>#
Examples
Using alpha mask mode
Specifications
Specification | Status | Comment |
---|---|---|
CSS Masking Module Level 1 The definition of 'mask-mode' in that specification. | Candidate Recommendation | Initial definition |
Browser compatibility
BCD tables only load in the browser
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论