Jump to content

Fixed background mobile

Go to solution Solved by tuanphan,

Recommended Posts

Hi there,

My goal is to have a fixed background image on my homepage and have the first section slide over it. I got it working on my laptop by using the code below. Unfortunately, when I open the homepage on my phone, the background image does not seem to have the right scale. I've tried a bunch of think, but now I'm stuck. Does anybody know how to fix it?

Thank you in advance! 😁

Site url: www.italynotes.com

 

[data-section-id="6361a26d0b428cbd72327846"] .section-background img {
  display:none;
}

[data-section-id="6361a26d0b428cbd72327846"] .section-background {
  background: url('https://images.squarespace-cdn.com/content/v1/6030444c2c8e1b45642b4b42/bf9c2fb8-cdc6-4841-b26f-aa8b9e5b8559/DSCF5035.jpg?format=2500w');
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  }

 

IMG_0302.PNG

Link to comment
  • Solution

Hi,

iOS doesn't support attribute background-attachment: fixed

so it will work on Android only

No way to fix this.

You can consider disable code on mobile.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.