简体   繁体   中英

Background image will not show on mobile (iPhone 6s)

I am currently working on a website and everything works and functions fine except the background image on mobile. I have quite literally tried everything and it will not show on mobile even though it shows just fine on my laptop. The phone I have is an iPhone 6s and it just doesn't want to show. I have used the same CSS code in other projects and it works just fine but it won't currently.

I have done some testing and the issue seems to be the background-position: cover. But what is a way around this without making the image look bad. Also when I click the mobile nav button to open the menu... you can see the image show in the back which is extremely strange...

Does anybody have any possible solutions to this? It's extremely frustrating.

Here is the link to the site: http://mujomusic.net/WDV351/Konstrukt/index.php

and the code:

height: 100vh;
background-image: url('images/main.jpg');
background-attachment: fixed;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;

Would u give a screenshot ,because it is working perfectly fine on mine. Could be cache Issue. 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM