Linear-gradient not working in Edge and IE11

3.2k Views Asked by At

My CSS isn't showing the background image in Microsoft Edge and IE11. It seems to have something to do with linear-gradients in those browsers. The background color shows up, but not the image in Edge and IE11. Any suggestions?

#DIV_1 {
    background-blend-mode: overlay, overlay;
    background-position: 50% 50%, 50% 50%;
    bottom: 0px;
    box-sizing: border-box;
    color: rgb(255, 255, 255);
    height: 400px;
    left: 356.25px;
    position: absolute;
    right: -356.25px;
    text-decoration: none solid rgb(255, 255, 255);
    text-size-adjust: 100%;
    top: 0px;
    width: 356.25px;
    column-rule-color: rgb(255, 255, 255);
    perspective-origin: 178.125px 200px;
    transform-origin: 178.125px 200px;
    caret-color: rgb(255, 255, 255);
    background: linear-gradient(rgb(0, 174, 217) 0%, rgb(23, 36, 169) 100%) no-repeat scroll 50% 50% / cover padding-box border-box, rgba(0, 0, 0, 0) url("http://www.purpleelephantpolitics.com/wp-content/uploads/2017/03/New-Pics-Of-Ducks-26-For-Line-Drawings-with-Pics-Of-Ducks.jpg") no-repeat scroll 50% 50% / cover padding-    box border-box;
    border: 0px none rgb(255, 255, 255);
    font: normal normal normal normal 16px / 22.8571px "Proxima Nova";
    outline: rgb(255, 255, 255) none 0px;
}/*#DIV_1*/

https://jsfiddle.net/t6j11zm4/

1

There are 1 best solutions below

0
I haz kode On

background-blend-mode is not supported on Edge and IE.

You can create something similar with pseudo-element overlays

Hover the image to see the effect:

body {
  background: #131418;
  text-align: center;
  margin: 1em auto;
}

.my-image-parent {
  display: inline-block;
  width: 300px;
  height: 300px;
  text-align: center;
}

.my-image {
  width: auto;
  height: 100%;
  background: url(https://unsplash.it/400/400);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.my-image {
  position: relative;
}

.my-image:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle at 30% 107%, rgba(253, 244, 151, 0.5) 0%, rgba(253, 244, 151, 0.5) 5%, rgba(253, 89, 73, 0.6) 45%, rgba(214, 36, 159, 0.6) 60%, rgba(40, 90, 235, 0.6) 90%);
  opacity: 0;
  transition: all ease 1s;
}

.my-image:hover:after {
  opacity: .5;
}
<div class="my-image-parent">
  <div class="my-image"></div>
</div>