Skip to main content
added 1299 characters in body
Source Link
Gautam Sheth
  • 31k
  • 1
  • 36
  • 62

Try it as below:

If you want it specifically on homepage, insert the below code in script editor/content editor webpart.

But if you want it for entire site collection, add it in the custom css file referred in masterpage or on the masterpage itself.

#s4-workspace
{
    background:url('../Style Library/Images/bg.png') no-repeat center center fixed;
}

or as below:

body.ms-backgroundImage
{
  background: url('../Style Library/Images/bg.png') no-repeat center center fixed; 
}

Edit 2 :

As per your comments, you want it for a specific section. Try it as below:

  1. Edit your page by clicking on gear icon in top right.

enter image description here

  1. Click on Add webpart. After doing that, click on the Script editor webpart and then click OK as below:

enter image description here

  1. I have selected Script editor webpart. Inside the webpart, add the below code snippet.

    .parallax-window { min-height: 400px; background: transparent; }
  2. Once that is done, click on Save. Checkin and publish the page. And there you have parallax for a specific section as below:

enter image description here

You need to change the path to that of your site collection.

Try it as below:

If you want it specifically on homepage, insert the below code in script editor/content editor webpart.

But if you want it for entire site collection, add it in the custom css file referred in masterpage or on the masterpage itself.

#s4-workspace
{
    background:url('../Style Library/Images/bg.png') no-repeat center center fixed;
}

or as below:

body.ms-backgroundImage
{
  background: url('../Style Library/Images/bg.png') no-repeat center center fixed; 
}

Try it as below:

If you want it specifically on homepage, insert the below code in script editor/content editor webpart.

But if you want it for entire site collection, add it in the custom css file referred in masterpage or on the masterpage itself.

#s4-workspace
{
    background:url('../Style Library/Images/bg.png') no-repeat center center fixed;
}

or as below:

body.ms-backgroundImage
{
  background: url('../Style Library/Images/bg.png') no-repeat center center fixed; 
}

Edit 2 :

As per your comments, you want it for a specific section. Try it as below:

  1. Edit your page by clicking on gear icon in top right.

enter image description here

  1. Click on Add webpart. After doing that, click on the Script editor webpart and then click OK as below:

enter image description here

  1. I have selected Script editor webpart. Inside the webpart, add the below code snippet.

    .parallax-window { min-height: 400px; background: transparent; }
  2. Once that is done, click on Save. Checkin and publish the page. And there you have parallax for a specific section as below:

enter image description here

You need to change the path to that of your site collection.

Source Link
Gautam Sheth
  • 31k
  • 1
  • 36
  • 62

Try it as below:

If you want it specifically on homepage, insert the below code in script editor/content editor webpart.

But if you want it for entire site collection, add it in the custom css file referred in masterpage or on the masterpage itself.

#s4-workspace
{
    background:url('../Style Library/Images/bg.png') no-repeat center center fixed;
}

or as below:

body.ms-backgroundImage
{
  background: url('../Style Library/Images/bg.png') no-repeat center center fixed; 
}