The mask-position property sets the starting place of each mask-image inside the area chosen by mask-origin. One value, two values, or a four-value edge offset can place the mask. With several mask layers, list positions with commas in the same order.
The initial value is 0% 0% (top left). The property is not inherited. Pair it with mask-repeat: no-repeat and a fixed mask-size when you want to see one placed mask instead of a tile.
Standard-track.
Not deprecated and not experimental. Unprefixed mask-position is Baseline widely available. Older Safari needed -webkit-mask-position. Unlike background-position, there is no three-value syntax.
Syntax
CSS Syntax
syntax.css
mask-position:center | top left | 25% 75% | 20px 30px | bottom 10px right 20px | initial | inherit;
One value implies center for the other axis. With two lengths or percentages, the first is horizontal and the second is vertical. Separate multiple mask layers with commas.
Values
Property Values
Value
Description
Try it
center
Centers the mask in both axes. One keyword alone centers the other axis
Read left to right, then top to bottom.25% is the horizontal place. 75% is the vertical place.
Match points, not edges only. Like background-position, the point 25% across the mask meets the point 25% across the box. The same idea applies for 75% vertically.
0% and 100% are the edges.0% 0% is top left. 100% 100% is bottom right. 50% 50% is center.
Size still matters. If the mask were the same size as the box, a percentage would have no leftover space to slide. Here the circle is smaller, so the move is visible.
Example 3 — Edge Offsets
Anchor to an edge, then nudge inward with a length. Use all four values.
Name the edge first.bottom and right choose which edges the mask sits against.
Offset after each edge.10px follows bottom, so the circle lifts 10px from the bottom. 20px follows right, so it moves 20px inward from the right.
Use four values. Offsetting from bottom or right needs both edge keywords and both lengths. A three-value form is invalid for mask-position.
Order of the pairs can swap.right 20px bottom 10px is the same placement. Plain bottom right sticks to the corner with no inset.
Edge Cases & Pitfalls
If the mask looks stuck, tiled, or unchanged, one of these is usually why.
image
No mask-image, no movement
mask-position only places an active mask layer. Set mask-image first, or use the mask shorthand that includes one.
repeat
Tiles hide a clear placement
The initial mask-repeat is repeat. The starting place still applies, but copies fill the box. Use no-repeat when you want one mask.
size
A full-size mask ignores percentages
If mask-size matches the box on an axis, that axis has no leftover space. A percentage then looks stuck. Use a length, or make the mask smaller than the box.
syntax
No three-value form
Unlike background-position, mask-position does not allow a three-value edge offset, and you cannot offset from center. From bottom or right, declare all four values.
origin
Position is measured from mask-origin
mask-origin picks the box the position uses. The default is padding-box. Changing the origin moves the same position value relative to a different box.
Compatibility
Browser Support
mask-position is a browser painting property for CSS masking. Node.js, Deno, and Bun do not apply it. Unprefixed support is Baseline. Older WebKit used -webkit-mask-position.
✓ Baseline · Widely available since Dec 2023
mask-position
Unprefixed: Chrome 120+, Edge 120+, Firefox 53+, Safari 15.4+. Prefixed WebKit support is older. Internet Explorer has no CSS mask-position.
97%Modern browser support
Google Chrome120+ unprefixed · older with -webkit-
Full support
Mozilla Firefox53+
Full support
Apple Safari15.4+ unprefixed · older with -webkit-
Full support
Microsoft Edge120+ unprefixed
Full support
Opera106+ unprefixed
Full support
Samsung Internet25+ unprefixed
Full support
Internet ExplorerNo support
None
mask-positionWidely supported
Bottom line: Safe for current browsers with the unprefixed property. Add -webkit-mask-position only if you must support older Safari or Chromium builds before the Baseline versions above. Do not treat this as a Node.js or other runtime feature.
Remember
Key Takeaways
Role: place each mask image inside the area from mask-origin.
Values: keywords, percentages, lengths, or four-value edge offsets such as bottom 10px right 20px.
Initial value:0% 0% (top left). It is not inherited.
See it clearly: use mask-repeat: no-repeat and a fixed mask-size when a single placed mask is the goal.
One line:mask-position chooses where the mask starts — after you have a mask-image, and usually after you turn off tiling.
Frequently Asked Questions
It sets the starting place of each mask image inside the area chosen by mask-origin. Keywords, percentages, lengths, and four-value edge offsets all place that mask. The initial value is 0% 0%, which is the top-left corner.
0% 0%, the same as top left. The mask starts at the top-left of the area defined by mask-origin (padding-box by default). The property is not inherited.
No. There must be a mask-image (or a mask shorthand that sets one). Without a mask layer, changing mask-position has nothing to move.
They share the same idea and similar values: place a layer inside a box. mask-position moves the mask image. background-position moves the background image. One difference: mask-position has no three-value syntax; offsetting from bottom or right needs all four values.
mask-repeat defaults to repeat, so copies can fill the box and hide placement. Use mask-repeat: no-repeat to see one mask. If mask-size fills the box, a percentage also has no room to slide.
Unprefixed mask-position is Baseline and widely available since December 2023: Chrome 120+, Edge 120+, Firefox 53+, Safari 15.4+. Older WebKit browsers used -webkit-mask-position. Internet Explorer does not support it. This is a browser CSS property. Node.js, Deno, and Bun do not paint it.