Path: blob/main/files/en-us/web/css/-webkit-mask-attachment/index.md
6552 views
------{{CSSRef}}{{Non-standard_Header}}
If a {{CSSxRef("mask-image")}} is specified, -webkit-mask-attachment determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block.
Syntax
Values
scroll
: If
scrollis specified, the mask image scrolls within the viewport along with the block that contains the mask image.
fixed
: If
fixedis specified, the mask image does not scroll with its containing element, instead remaining stationary within the viewport.
Formal definition
{{CSSInfo}}
Formal syntax
Examples
Fixing a mask image to the viewport
Specifications
Not part of any standard.
Browser compatibility
{{Compat}}
See also
{{CSSxRef("mask")}}
{{CSSxRef("mask-clip")}}
{{CSSxRef("-webkit-mask-box-image")}}
{{CSSxRef("mask-origin")}}
{{CSSxRef("mask-image")}}
{{CSSxRef("-webkit-mask-composite")}}
{{CSSxRef("mask-repeat")}}