css - How to fix: Full background image distorts in IE but works fine in chrome when using background-size: cover -


please have css distortion have been battling cross browser:

https://dim.crservicesplc.ng/

works fine in chrome distorts in others

chrome: enter image description here

ie, edge, firefox enter image description here

assistance appreciated

references:

http://www.w3schools.com/graphics/svg_rect.asp http://www.w3schools.com/graphics/svg_fegaussianblur.asp
https://developer.mozilla.org/en-us/docs/web/svg/element/fegaussianblur

you control intensity of filter stddeviation="15" , <rect style="opacity: 0.5;" /> , color of filter <rect style="fill: #333;>

solution #1

#home_main {      margin: -30px;      background-size: cover;      padding: 0;      background-image: url('https://dim.crservicesplc.ng/img/bg.jpg') !important;  /*            filter: blur(2px);*/      overflow: hidden;      box-shadow: inset 0 0 0 1000px rgba(0,0,0,.3);  }    body {      overflow: hidden !important;  }    #home_content {      font-size: 12pt;      text-align: center;      font-weight: 600;      position: absolute;      z-index: 2;      top: 50%;      left: 50%;      transform: translate(-50%, -50%);      text-shadow: none;      font-family: 'open sans' !important;      filter: initial !important;      box-shadow: initial !important;  }        #home_content h1 {          color: #fff !important;          font-size: 42px;          font-weight: bold;          margin-bottom: 20px;      }        #home_content p {          color: #fff !important;      }
<div id="home_main" style="height: 613px;">      <svg id="mysvg" width="100%" height="100%" viewbox="0 0 1131 591">          <filter id="blurme">              <fegaussianblur in="sourcegraphic" stddeviation="15" />          </filter>        <rect filter="url(#blurme)" width="1131" height="591" style="fill: #333; opacity: 0.5;  -ms-transform: scale(3, 3); -webkit-transform: scale(3, 3);   transform: scale(3, 3); transform-origin: center;" />      </svg>  </div>

solution #2

#home_main {      margin: -30px;      background-size: cover;      padding: 0;      /*background-image: url('https://dim.crservicesplc.ng/img/bg.jpg') !important;*/  /*            filter: blur(2px);*/      overflow: hidden;      box-shadow: inset 0 0 0 1000px rgba(0,0,0,.3);  }    body {      overflow: hidden !important;  }    #home_content {      font-size: 12pt;      text-align: center;      font-weight: 600;      position: absolute;      z-index: 2;      top: 50%;      left: 50%;      transform: translate(-50%, -50%);      text-shadow: none;      font-family: 'open sans' !important;      filter: initial !important;      box-shadow: initial !important;  }    #home_content h1 {      color: #fff !important;      font-size: 42px;      font-weight: bold;      margin-bottom: 20px;  }    #home_content p {      color: #fff !important;  }
<div id="home_main" style="height: 613px;">      <svg id="mysvg" width="100%" height="100%" viewbox="0 0 1131 591">          <filter id="blurme">              <fegaussianblur in="sourcegraphic" stddeviation="2" />          </filter>          <image filter="url(#blurme)" xlink:href="https://dim.crservicesplc.ng/img/bg.jpg" x="0" y="0" height="100%" width="100%"/>      </svg>  </div>


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -