does a background-attachment of fixed work in iOS5?

前端 未结 3 816
忘掉有多难
忘掉有多难 2020-12-03 21:06

Does this work in > iOS 5?

.element {
    background: url(images/myImage.jpg) 50% 0 no-repeat fixed;
}

I thought that it should, but so far

3条回答
  •  攒了一身酷
    2020-12-03 21:43

    According to this background-attachment support matrix, no.

    Another post suggests that coming up with a workaround for mobile devices is not worth it:

    ...both Android and iPhone block timers or render during scroll, so the effect is that divs move with the scrolled page and only after, eventually, divs come back in the expected position. This is against position fixed idea

提交回复
热议问题