Background-image css fails to display in IE7 & 8

前端 未结 3 1593
忘了有多久
忘了有多久 2021-01-23 00:04

For some reason I\'m having issues displaying a background image in IE 7 and IE8. In IE9 and more modern browsers it works and outputs the following:

3条回答
  •  佛祖请我去吃肉
    2021-01-23 00:54

    As this is my first responsive design, I have had to use media queries to adapt the css based upon the screen/viewport size. It appears that only the "media="'screen'" and "media='print'" declarations work in IE7 and IE8 meaning my declaration of : will not work. This is the reason my background-images are not displaying because IE7 and 8 do not understand this declaration and therefore ignore it. Thanks for the other valid answers guys but they are things I already knew about and had tried.

提交回复
热议问题