Using background-attachment:fixed in safari on the ipad

You can use this code to make a fixed background layer to hack into this problem.

#background_wrap {
    z-index: -1;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-size: 100%;
    background-image: url('xx.jpg');
    background-attachment: fixed;
}

And put <div id="background_wrap"></div> into <body></body>

<body>
<div id="background_wrap"></div>
</body>

Leave a Comment