Mobile special effects problem

https://www.apple.com/cn/ios/.

the problem of sliding special effects viewed on Apple"s official website on the mobile side.

in F12, I found that the z-index attribute of each < session > tag is arranged from big to small, but there is no train of thought. I hope you can give me some ideas or some website materials. I did not find this part, please, thank you


you can look for examples of parallax scrolling, or you can use some plug-ins to help with


have worked on a website before

.box {
    width: 800px;
    height: 1200px;
    background-image: url(./a.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

<div class="box"></div>

the key is the background-attachment: fixed attribute, which is set to a fixed background image. You can see the effect by giving it a try.


take a look, it seems to be sticky positioning.

you can study the sticky positioning Polyfill , there is Demo to see, according to the use of the document to try it yourself.

Menu