Fixed positioning/z-index issue in mobile safari

五迷三道 提交于 2019-11-27 18:09:31

Ugh amazing. Just had to add:

-webkit-transform: translate3d(0,0,0);

to the #content div.

For Mobile Safari it's better to avoid using position:fixed

Make sure you use such CSS for your scrolling container and all children inside of it

.scrolling-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.scrolling-container .child-element {
    position: relative;
    -webkit-transform: translate3d(0,0,0);
}

If you apply #banner {z-index:-1} and body {background:transparent} your problem should be solved.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!