0

What will be Microsoft EDGE Browser alternatives of the following code?

background-image: linear-gradient(to right, rgba(226, 115, 20, 0.64) 0%, #ea2415b3 100%)

I tried Following codes:

background-image: -webkit-linear-gradient(to right, rgba(226, 115, 20, 0.64) 0%, #ea2415b3 100%);

background-image: -ms-linear-gradient(to right, rgba(226, 115, 20, 0.64) 0%, #ea2415b3 100%);

background-image: linear-gradient(to right, rgba(226, 115, 20, 0.64) 0%, #ea2415b3 100%);

Secondly, I tried to insert image and color in background but it displayed only color, not an image. I write this:

background : linear-gradient(0deg,#e97320,#000000),url(/img/Saturn_Astrologer.jpg) no-repeat center;

Thank You :)

Pritesh
  • 1,066
  • 3
  • 15
  • 35
  • 1
    Please check this (invalid) value first: `#ea2415b3`? If you wanted both values to be rgba, than do so, it has to work. – skobaljic Sep 20 '19 at 08:43
  • 1
    @skobaljic it's not invalid: https://www.w3.org/TR/css-color-4/#hex-notation but probably still not supported everywhere – Temani Afif Sep 20 '19 at 08:52
  • 1
    Let him just use regular color, as `linear-gradient(to right, rgba(226, 115, 20, 0.64) 0%, rgb(234, 36, 179) 100%)` and it will work fine, simply Edge won't byte `#ea2415b3`. Check [support for 8 digits hex](https://caniuse.com/#feat=css-rrggbbaa). – skobaljic Sep 20 '19 at 08:53
  • @skobaljic It's working fine. Yes, in IE and Edge browser not supported eight digits hex color now. – Pritesh Sep 20 '19 at 09:11
  • @TemaniAfif this article helps me a lot. – Pritesh Sep 20 '19 at 09:12
  • Your comments are very useful to me. Thank you – Pritesh Sep 20 '19 at 09:13
  • @skobaljic I tried to put image and color in background but it displayed only color, not an image. I write this: `background : linear-gradient(0deg,#e97320,#000000),url(/img/Saturn_Astrologer.jpg) no-repeat center;` – Pritesh Sep 20 '19 at 10:01
  • 1
    When combine two or more, read this: https://stackoverflow.com/questions/2504071/how-do-i-combine-a-background-image-and-css3-gradient-on-the-same-element – Asons Sep 20 '19 at 10:20

0 Answers0