16

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)));
Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
MALK
  • 393
  • 1
  • 3
  • 15

1 Answers1

4

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

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.

Community
  • 1
  • 1
Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
  • 3
    Except you can't use it with `gradient`, you have to [use SVG instead](https://developer.mozilla.org/En/Applying_SVG_effects_to_HTML_content). – robertc Dec 07 '11 at 11:16