Multiple Background Images issues in ie7/ie8

后端 未结 2 1123
既然无缘
既然无缘 2021-01-26 15:16

I am trying to solve a bug in ie7/ie8 for multiple background images...

I know that in originally it doesn\'t support in ie\'s but i have googled some interesting stuff

相关标签:
2条回答
  • 2021-01-26 15:57

    Use nested divs for a crossbrowser-compatible solution.

    Demo:
    http://jsfiddle.net/CsKhy/5/

    Note: background-size is not compatible in IE8 or lower, so maybe it's better using images instead of backgroundimages.

    0 讨论(0)
  • 2021-01-26 16:07

    I use

    <style>
      .bgImage{width:100%;}
    </style>
    

    Right after the body tag and before any other code insert this

    <img src="yourimage" class="bgImage"/>
    

    Not ideal solution but is compatible and works, I have used it many times. (make sure your image is a large image to begin with otherwise it will distort on larger screens)

    0 讨论(0)
提交回复
热议问题