background size cover IE11 not covering full area

前端 未结 1 1617
滥情空心
滥情空心 2021-01-16 10:22

I\'m going bonkers. IE11 refuses to fill the entire area of a DIV with a background image, even though I\'ve set the background-size property to cover. Consider the followin

相关标签:
1条回答
  • 2021-01-16 10:57

    I've managed to fix the issue by applying the following CSS. I'm not a 100% happy with it, but it'll have to do.

    If anyone runs into the same issue, test this fix, it may work depending on your scenario, maybe it won't.

    .bg {
        ...
        background-size: 100% 100%;
    }
    

    Holy crab-shoe on a stick ... well, this is kinda embarrassing.

    The problem was: IE was zoomed out.

    The solution: zoom in.

    The CSS was working fine all along.

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