Proprietà CSS in modalità maschera
Esempio
Lascia che l'immagine del livello della maschera venga trattata come una maschera di luminanza:
.mask1 {
-webkit-mask-image: url(w3logo.png);
mask-image: url(w3logo.png);
-webkit-mask-size: 70%;
mask-size: 70%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
mask-mode: luminance;
}
Definizione e utilizzo
La mask-mode
proprietà specifica se l'immagine del livello maschera deve essere trattata come una maschera di luminanza o come una maschera alfa.
Valore di default: | fonte di corrispondenza |
---|---|
Ereditato: | no |
Animabile: | no. Leggi su animabile |
Versione: | CSS3 |
sintassi JavaScript: | oggetto .style.maskMode="alpha" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
mask-mode | Not supported | Not supported | 53.0 | Not supported | Not supported |
Sintassi CSS
mask-mode:
match-source|luminance|alpha|initial|inherit;
Valori di proprietà
Value | Description |
---|---|
match-source | If the mask-image property is an image (an image URL or a gradient), set mask-mode to alpha. If the mask-image property is an SVG <mask> element, use the <mask> element's mask-type property. This is default. |
luminance | Use the luminance values of the mask image as the mask values |
alpha | Use the alpha values of the mask image as the mask values |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Pagine correlate
Riferimento CSS: proprietà mask-image
Riferimento CSS: proprietà mask-origin
Riferimento CSS: proprietà mask-position
Riferimento CSS: proprietà mask-repeat
Riferimento CSS: proprietà mask-size
Tutorial CSS: Mascheratura CSS