For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/css/properties/mask-composite.md.
Lynx
  • 简体中文
  • mask-composite

    介绍

    mask-composite CSS 属性设置当前遮罩层与其下方遮罩层之间使用的合成操作。

    语法

    mask-image: linear-gradient(#000, #000), linear-gradient(#000, transparent);
    mask-composite: exclude;

    取值

    • add
      将当前遮罩层叠加到其下方遮罩层之上。

    • subtract
      从下方遮罩层中减去当前遮罩层。

    • intersect
      保留下方遮罩层与当前遮罩层的重叠区域。

    • exclude
      保留下方遮罩层与当前遮罩层不重叠的区域。

    形式定义

    初始值add
    适用元素view only
    是否支持继承no
    是否支持动画no

    形式语法

    mask-composite = <compositing-operator>#
    
    <compositing-operator> =
      add        |
      subtract   |
      intersect  |
      exclude

    与 Web 的区别

    • 不支持全局属性值,例如 inheritinitialunset 等。

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。