IE 10 & 11 make fixed backgrounds jump when scrolling with mouse wheel

前端 未结 6 1055
不知归路
不知归路 2020-12-02 16:45

When you scroll with the mouse wheel in Windows 8 the fixed background image bounces around like crazy. This only affects IE 10 and IE 11. This affects elements with p

6条回答
  •  渐次进展
    2020-12-02 17:13

    Here is a workaround (tested on Windows 8.1):

    Move the "background" CSS property to the BODY element. Currently it is on the DIV element with id="filler". Here is the resulting CSS:

        body {
            font-family: Helvetica, Arial, sans-serif;
            background: #fff url(blue-kitty.jpg) no-repeat fixed center 100px;
        }
    
        #filler {
            text-align: center;
        }
    
        .big-margin {
            margin-top: 500px;
        }
    

提交回复
热议问题