I was about to redesign my website and made some background which where background-attachment: fixed. Unfortunately this feature doesn’t work on iPads, so I wanted to set a media query so that the iPad users see the image without any moving. The first picture behind “video” works fine (I mean the pictures behind those headlines) but the second one zooms into the picture. The third one simply doesn’t appear. Don’t know why it won’t load. You can test the desktop version which works fine on most browsers already but on the iPad it won’t work.
I would like to look the second and third picture like the first one does. Without zoom and anything.
According to the validator, these are not valid links:
<link rel="stylesheet" media="all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait)" href="ipad-portrait.css">
<link rel="stylesheet" media="all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape)" href="ipad-landscape.css">
Thanks for your responses. I found a way to debug with ease on the iPad through the Safari Mobile Web Inspector. I can tick the CSS rules that I want to apply to the element chosen. So I un-ticked the boxes of background-attachment: fixed and suddenly the images were visible exactly how I wanted them to be!
But I actually put the background-attachment to scroll. I put an extra !important behind it and it worked then.
Thanks for your tips and help anyway!
The iphone and (some other mobile devices) don’t do background-attachment fixed as such but they can now do position:fixed elements so there is a way around the fixed background problem assuming that the fixed attachment is on the body element.
The solution is documented in my codepen here:
Otherwise you just need to remove the fixed background attachment for mobile devices (as you already found out :)).