Background-size 100% not working in IE8 and IE7

后端 未结 2 2003
北海茫月
北海茫月 2021-01-21 07:03

I have an empty div which contain a background image that is bigger than the size of the container. I fix this one by background-image property with the value (100%

2条回答
  •  有刺的猬
    2021-01-21 07:16

    background-size not supported by ie7 and ie8.

    the alternative way you can use put 'tag' in div tag and add width 100% to it. It is full scalable.

    try this code:

    or

    html:

    css:

    .container img {
         width:100%
     }
    

提交回复
热议问题