Why is my linear gradient not working in Firefox?

I am testing my application on Firefox 33. I have a simple background property set with a gradient:

background: linear-gradient(bottom, #004771 0%, #005185 100%);

and it does not work. CanIUse reports that gradients in Firefox 33 can be used without a prefix. So why is this not working? If I add a Mozilla specific prefix:

background: -moz-linear-gradient(bottom, #004771 0%, #005185 100%);

everything is working fine.

+4
source share
2 answers

When using a linear gradient without a prefix, you need to write it as follows ("bottom" instead of "bottom"):

background: linear-gradient(to bottom, #004771 0%, #005185 100%);

EDIT: : https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient#Syntax

+5

to bottom, :

background: linear-gradient(to bottom, #004771 0%, #005185 100%);

jsfiddle

0

Source: https://habr.com/ru/post/1568165/


All Articles