Jump to content

background-attachment: fixed, parallax background ios

Recommended Posts

Site URL: https://www.camillaottesen.dk

Hey. 

 

I'm using parallax headers in several pages, made with  background-attachment: fixed. 

How can I twist the code, so it will also work i IOS? 

(i have removed the image-url in the following)

 

[data-section-id="61e145e15bc8c537841f2161"]{
  .section-background{
    &::after {
    //creating the element      
      content: "";
      width:100%;
      height:100%;
      position: absolute;
      
      //adding the image
      background-image:url("IMAGE-URL(removed in this code-example");
      background-repeat:no-repeat;
      opacity:70%;
      //positioning the image
      background-size:cover;
      background-position:center center;
      background-attachment: fixed;
      transform: scale(1);  
      
  }
}
 

www.camillaottesen.dk

code: Camilla

Link to comment
  • 8 months later...
  • Replies 2
  • Views 443
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.