- This topic is empty.
-
AuthorPosts
-
March 27, 2012 at 9:08 am #37361ThomasmorelMember
My backgroundimage dissapears on the Iphone (it’s visible on every browser on the computer).
Thereby. The image is not fullscreen on every browser. This is the code I used:
<style type=”text/css”>
html {
background: url(http://i1230.photobucket.com/albums/ee487/thomasmorel/homeafbeelding.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>March 27, 2012 at 9:32 am #100037markswebMemberThis might not be much help, but it works fine on my iPad and Apple say that Safari on iOS uses the same webkit engine as the desktop so in theory you shouldn’t have a problem.
My first suggestion would be to store the image on your server and reference that locally as it could be a timeout type error where it’s not loading the image in time.
Also, you might find this documentation helpful if you’re looking at iOS; https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/Introduction/Introduction.html#//apple_ref/doc/uid/TP40002079-SW1
March 27, 2012 at 10:16 am #100046SenffParticipantI believe iPhone doesn’t support the “fixed” property for backgrounds, so that’s maybe the root of the issue?
March 27, 2012 at 11:25 am #100053dfoggeParticipantposition:fixed is not supported on pre-ios5 devices.
March 27, 2012 at 11:36 am #100054ThomasmorelMemberOk. SO i might leave the fixed out. Let’s see what
happensMarch 27, 2012 at 11:39 am #100055ThomasmorelMemberOk. This is what happens website. The photo is visible on Iphone, but it’s not fullscreen anymore.
March 27, 2012 at 11:43 am #100057ThomasmorelMemberIs there a code without the ‘position: fixed’ (cause this indeed is the problem for visibility on Iphone) I can use to always have my background image fullscreen?
March 27, 2012 at 12:08 pm #100061dfoggeParticipantwhoa just realized your bg image is over 1mb. you should definitely try to bring that down a bit.
March 27, 2012 at 1:11 pm #100066SenffParticipantiOS + background image manipulation = no happy marriage
I would suggest to use an older method, like two (absolute positioned) layers.
One has the same width and height as the viewport and contains the image
The other one (on top of the first one) has your content.OR
You just forget about it and make it different (= simpler) for iOS devices. ;)
March 27, 2012 at 4:38 pm #100081ThomasmorelMemberMarch 27, 2012 at 4:45 pm #100082chrisburtonParticipantWhat about javascript?
March 28, 2012 at 6:28 am #100109Bogdan DimitrovParticipantHi Tomasmorel,
I’m not so advanced like guys here, but always try to help if can.
I just made some tests. You can try this code:
html {
background: url(“http://i1230.photobucket.com/albums/ee487/thomasmorel/homeafbeelding.png”) no-repeat fixed center center transparent;
-webkit-background-size: 1920px 960px;
-moz-background-size: cover;
background-size: cover;
}I tested it under Mozila, Opera, Chrome, Safari /all for Windows/, and in Device Central for profile Apple iPhone 4 /640 x 960/ – it works
It doesn’t work under IE 8.Also take a look at this publication http://www.alistapart.com/articles/supersize-that-background-please/
Regards
December 11, 2014 at 12:19 am #190574cmckayParticipantI had an negative text-indent that was throwing my background image off the page, so color:Transparent it is then.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.