D
D
deputatvudu2020-04-23 22:54:44
css
deputatvudu, 2020-04-23 22:54:44

How to make background: fixed work on Iphone?

Works everywhere but not on iphone.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
deputatvudu, 2020-04-24
@deputatvudu

Fix not the background, but the block or pseudo-element.

body:before {
    content: '';
    background-image: url(...);
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: -1;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question