Jump to content

How to remove parallax background image on mobile only

Recommended Posts

I'm trying to remove the background image in one section of my client's website. The problem I'm running into is that this background use the parallax scrolling effect under "image effects" and the code I'm using does not work unless this effect is turned off. 

 

Here's the code I'm using: 

@media only screen and (max-width: 640px){
section[data-section-id="638f6708f2b3a25317940ad5"]

.section-background img { opacity:0!important }}

 

I tried adding the code below as well- and it works to remove the background image, however it removes all of the parallax background images and I'm only wanting to target the one section.

@media only screen and (max-width: 640px) {
.section-background-content {
display: none !important;
    }
}

 

Any insight on this issue is greatly appreciated! 

Link to comment
  • Replies 1
  • Views 299
  • 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.