CSS background stretches to fill screen on Safari but not on iOS
问题 This CSS successfully stretches my background image to fill 100% of the screen area and not scroll on safari but not on iOS. How can I also prevent the image from scrolling on iOS? body { width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: url(../img/background.jpg) center repeat-x; background-size: auto 100%; background-attachment: fixed } 回答1: body { width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: url(../img/background.jpg) center repeat-x fixed