How do I make background-size work in IE?

前端 未结 8 2097
无人共我
无人共我 2020-11-22 00:30

Is there any known way to make the CSS style background-size work in IE?

相关标签:
8条回答
  • 2020-11-22 01:24

    I created jquery.backgroundSize.js: a 1.5K jquery plugin that can be used as a IE8 fallback for "cover" and "contain" values. Have a look at the demo.

    0 讨论(0)
  • 2020-11-22 01:28

    you can use this file (https://github.com/louisremi/background-size-polyfill “background-size polyfill”) for IE8 that is really simple to use:

    .selector {
    background-size: cover;
    -ms-behavior: url(/backgroundsize.min.htc);
    }
    
    0 讨论(0)
提交回复
热议问题