非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
若
-webkit-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.
/* Keyword values */ -webkit-mask-attachment: scroll; -webkit-mask-attachment: fixed; -webkit-mask-attachment: local; /* Multiple values */ -webkit-mask-attachment: scroll, local; -webkit-mask-attachment: fixed, local, scroll; /* Global values */ -webkit-mask-attachment: inherit; -webkit-mask-attachment: initial; -webkit-mask-attachment: unset;
scroll
is specified, the mask image scrolls within the viewport along with the block that contains the mask image.
fixed
is specified, the mask image does not scroll with its containing element, instead remaining stationary within the viewport.
| 初始值 |
scroll
|
|---|---|
| 适用于 | 所有元素 |
| 继承 | no |
| 计算值 | 如指定 |
| 动画类型 | discrete |
<attachment>#
body {
-webkit-mask-image: url('images/mask.png');
-webkit-mask-attachment: fixed;
}
Not part of any standard.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-webkit-mask-attachment
非标
|
Chrome 不支持 1 — 24 | Edge 不支持 No | Firefox 不支持 No | IE 不支持 No | Opera 不支持 No | Safari 完整支持 4 | WebView Android 不支持 ≤37 — ≤37 | Chrome Android 不支持 18 — 25 | Firefox Android 不支持 No | Opera Android 不支持 No | Safari iOS 完整支持 3.2 | Samsung Internet Android 不支持 1.0 — 1.5 |
完整支持
不支持
非标。预期跨浏览器支持较差。
-webkit-mask
-webkit-mask-clip
-webkit-mask-box-image
-webkit-mask-origin
-webkit-mask-image
-webkit-mask-composite
-webkit-mask-repeat
-webkit-border-before
-webkit-box-reflect
-webkit-line-clamp
-webkit-mask-attachment
-webkit-mask-composite
-webkit-mask-position-x
-webkit-mask-position-y
-webkit-mask-repeat-x
-webkit-mask-repeat-y
-webkit-overflow-scrolling
-webkit-tap-highlight-color
-webkit-text-fill-color
-webkit-text-stroke
-webkit-text-stroke-color
-webkit-text-stroke-width
-webkit-touch-callout
box-align
box-direction
box-flex
box-flex-group
box-lines
box-ordinal-group
box-orient
box-pack