Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a -moz-mask CSS property, like -webkit-mask-image?

It seems -moz-mask-image is not supported in Firefox.

I am attempting a foreground gradient. I can't use an image as i need the text to be selectable. Does anyone have any ideas for Firefox?

This version works in chrome and safari

css:

-webkit-mask-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.16, rgba(0,0,0,0)), color-stop(0.52, rgba(0,0,0,.5)), color-stop(0.77, rgba(0,0,0,1)));

-moz-mask: -moz-gradient(linear, left bottom, left top, color-stop(0.16, rgba(0,0,0,0)), color-stop(0.52, rgba(0,0,0,.5)), color-stop(0.77, rgba(0,0,0,1)));
like image 445
MALK Avatar asked Dec 07 '11 11:12

MALK


1 Answers

According to MDN, you can just use mask for Firefox, as of Firefox 3.5:

  • https://developer.mozilla.org/en/CSS/mask

However, mask requires an SVG image to act as the mask. You might be able to base-64 encode your SVG image into your stylesheet, or you can use an SVG image file.

like image 148
Paul D. Waite Avatar answered Nov 12 '22 18:11

Paul D. Waite