非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
-webkit-mask-repeat-y
property sets whether and how a mask image is repeated (tiled) vertically.
/* Keyword values */ -webkit-mask-repeat-y: repeat; -webkit-mask-repeat-y: no-repeat; -webkit-mask-repeat-y: space; -webkit-mask-repeat-y: round; /* Multiple values */ -webkit-mask-repeat-y: repeat, no-repeat, space; /* Global values */ -webkit-mask-repeat-y: inherit; -webkit-mask-repeat-y: initial; -webkit-mask-repeat-y: unset;
The mask image is repeated vertically.
The mask image is not repeated vertically; only one copy of the mask image is drawn in vertical direction. The vertical remainder of the masked element's content is not displayed.
The mask image is repeated vertically.
mask-position
property is ignored unless only one image can be displayed without clipping. The only case where clipping happens using space is when there isn't enough room to display one image.
As the allowed vertical space increases in size, the repeated images will stretch (leaving no gaps) until there is room for another one to be added. When the next image is added, all of the current ones compress to allow room. Example: An image with an original height of 260px, repeated three times, might stretch until each repetition is 300px high, and then another image will be added. They will then compress to a height of 225px.
| 初始值 |
repeat
|
|---|---|
| 适用于 | 所有元素 |
| 继承 | no |
| 计算值 |
for
<length>
the absolute value, otherwise a percentage
|
| 动画类型 | discrete |
repeat | no-repeat | space | round
.exampleone {
-webkit-mask-image: url('mask.png');
-webkit-mask-repeat-y: repeat;
}
.exampletwo {
-webkit-mask-image: url('mask.png');
-webkit-mask-repeat-y: no-repeat;
}
You can specify a different
<repeat-style>
for each mask image, separated by commas:
.examplethree {
-webkit-mask-image: url('mask1.png'), url('mask2.png');
-webkit-mask-repeat-y: repeat, space;
}
Each image is matched with the corresponding repeat style, from first specified to last.
Not part of any standard.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-webkit-mask-repeat-y
非标
|
Chrome 完整支持 3 | Edge 完整支持 18 | Firefox 不支持 No | IE 不支持 No | Opera 完整支持 15 | Safari 完整支持 5 | WebView Android 完整支持 37 | Chrome Android 完整支持 18 | Firefox Android 不支持 No | Opera Android 完整支持 15 | Safari iOS 完整支持 5 | Samsung Internet Android 完整支持 1.0 |
完整支持
不支持
非标。预期跨浏览器支持较差。
-webkit-mask-repeat
,
-webkit-mask-repeat-x
-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