非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
-webkit-mask-position-x
CSS property sets the initial horizontal position of a mask image.
/* Keyword values */ -webkit-mask-position-x: left; -webkit-mask-position-x: center; -webkit-mask-position-x: right; /* <percentage> values */ -webkit-mask-position-x: 100%; -webkit-mask-position-x: -50%; /* <length> values */ -webkit-mask-position-x: 50px; -webkit-mask-position-x: -1cm; /* Multiple values values */ -webkit-mask-position-x: 50px, 25%, -3em; /* Global values */ -webkit-mask-position-x: inherit; -webkit-mask-position-x: initial; -webkit-mask-position-x: unset;
| 初始值 |
0%
|
|---|---|
| 适用于 | 所有元素 |
| 继承 | no |
| 百分比 | refer to the size of the box itself |
| 计算值 |
for
<length>
the absolute value, otherwise a percentage
|
| 动画类型 | discrete |
<length-percentage>
0%
means the left edge of the image is aligned with the box's left padding edge and a value of
100%
means the right edge of the image is aligned with the box's right padding edge.
left
0%
.
center
50%
.
right
100%
.
| 初始值 |
0%
|
|---|---|
| 适用于 | 所有元素 |
| 继承 | no |
| 百分比 | refer to the size of the box itself |
| 计算值 |
for
<length>
the absolute value, otherwise a percentage
|
| 动画类型 | discrete |
[ <length-percentage> | left | center | right ]#where
<length-percentage> = <length> | <percentage>
.exampleOne {
-webkit-mask-image: url(mask.png);
-webkit-mask-position-x: right;
}
.exampleTwo {
-webkit-mask-image: url(mask.png);
-webkit-mask-position-x: 25%;
}
Not part of any standard.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-webkit-mask-position-x
非标
|
Chrome 完整支持 1 | Edge 完整支持 18 | Firefox 完整支持 49 | IE 不支持 No | Opera 完整支持 15 | Safari 完整支持 3.2 | WebView Android 完整支持 2 | Chrome Android 完整支持 18 | Firefox Android 完整支持 49 | Opera Android 完整支持 14 | Safari iOS 完整支持 3.2 | Samsung Internet Android 完整支持 1.0 |
完整支持
不支持
非标。预期跨浏览器支持较差。
-webkit-mask-position
,
-webkit-mask-position-y
,
-webkit-mask-origin
,
-webkit-mask-attachment
-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