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:
- Edit your page by clicking on gear icon in top right.
- Click on Add webpart. After doing that, click on the Script editor webpart and then click OK as below:
I have selected Script editor webpart. Inside the webpart, add the below code snippet.
.parallax-window { min-height: 400px; background: transparent; }Once that is done, click on Save. Checkin and publish the page. And there you have parallax for a specific section as below:
You need to change the path to that of your site collection.