Adding a Parallax Section to Your Shopify Store
Learn how to add a section with a parallax effect to enhance the visual experience of your homepage

- Creates a visually engaging user experience
- Draws attention to featured products or content
- Adds depth and visual interest to your homepage
- Enhances the overall aesthetic of your store
- Shopify admin access
A parallax section creates an engaging visual effect where the background image appears to move at a different speed than the foreground content as users scroll. This tutorial will guide you through implementing a parallax section with fixed scrolling using HTML, CSS, and Liquid in your Shopify store.
In e-commerce, every 100 milliseconds of latency during the checkout transition directly reduces conversion probability by up to 7%. Code written natively for the Liquid runtime always beats client-side script injections.
Benefits of a Parallax Section
Creates a visually engaging user experience Draws attention to featured products or content Adds depth and visual interest to your homepage Enhances the overall aesthetic of your store
Shopify admin access Ability to edit theme files A product to feature in the parallax section
Step-by-Step Implementation
Create a Theme Backup
From your Shopify admin, go to Online Store > Themes, and duplicate your active theme for safe editing.
In your duplicated theme, navigate to the Assets folder Open the theme.scss.liquid file Add the following CSS code to the file:
Create the Parallax Section
Navigate to the Sections folder in your theme editor Create a new file called parallax-featured-product.liquid Copy and paste the following code into the file:
Add the Section to Your Homepage
Go to your Shopify admin Navigate to Online Store > Pages > Home page Click Customize to open the theme editor Find the "Featured Product Parallax" section in the section picker Add the section to your homepage where you want it to appear
Configure the Section Settings
In the theme editor, select the parallax section Choose your desired background image using the image picker Select the product you want to feature Customize the button text as needed
Your parallax section will now display on your homepage with a visually engaging scrolling effect. As users scroll, the background image will remain fixed while the foreground content moves, creating an attractive depth effect that highlights your featured product.
The parallax effect may not work on all mobile devices due to browser limitations Choose high-quality images for the best visual results Test the section on different devices to ensure proper responsiveness
For additional support, feel free to reach out via the contact form.
Implementation Snippets (2)
Drop these directly into your Shopify theme, in the order shown.
// Parallax Featured Product Style
.featured {
position: relative !important;
background-size: cover !important;
background-position: center !important;
background-repeat: no-repeat !important;
background-attachment: fixed !important;
height: 400px;
color: #fff;
font-size: 18px;
font-size: 1.125rem;
overflow: hidden;
}
.featured h3 {
color: #fff;
font-weight: 900;
text-transform: uppercase;
line-height: 1;
font-size: 36px;
font-size: 2.25rem;
}
.featured .price_box {
display: inline-block;
margin-right: 15px;
float: left;
}
.featured .price_box .new_price {
font-size: 2rem;
color: #fff;
}
.featured .price_box .old_price {
color: #999;
text-decoration: line-through;
display: inline-block;
white-space: nowrap;
font-weight: 500;
font-size: 16px;
font-size: 1rem;
margin-left: 5px;
font-size: 1.125rem;
}
.opacity-mask {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
background-color: rgba(0, 0, 0, 0.5);
}
.align-items-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.d-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.margin_60 {
padding-top: 60px;
padding-bottom: 60px;
}
.container {
width: 100%;
padding-right: 15px;
padding-left: 40px;
margin-right: auto;
margin-left: auto;
}
.row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.column-one {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
@media (max-width: 767px) {
.featured {
font-size: 16px;
}
.featured h3 {
color: #fff;
font-weight: 900;
text-transform: uppercase;
line-height: 1;
font-size: 28px;
}
.featured .price_box .new_price {
font-size: 20px;
color: #fff;
}
.margin_60 {
padding-top: 30px;
padding-bottom: 30px;
}
.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
.row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.column-one {
-ms-flex: 0 0 50%;
flex: 0 0 90%;
max-width: 100%;
}
}{% comment %}
custom
code by
https://www.doudmine.com/
{% endcomment %}
{%- assign featured_product = all_products[section.settings.featured_product_handle] -%}
<div class="featured lazy" style="background: url({% if section.settings.img_product %}{{ section.settings.img_product | img_url: 'master' }}{% else %}https://via.placeholder.com/1200x800{% endif %}) 50% 70%;">
<div class="opacity-mask d-flex align-items-center">
<div class="container margin_60">
<div class="row justify-content-center justify-content-md-start">
<div class="column-one">
<h3>{{ featured_product.title }}</h3>
<p>{{ featured_product.description | truncate: 100 }}</p>
<div class="feat_text_block">
<div class="price_box">
<span class="new_price">{{ featured_product.variants.first.price | money }}</span>
{%- if featured_product.variants.first.compare_at_price > featured_product.variants.first.price -%}
<span class="old_price">{{ featured_product.variants.first.compare_at_price | money }}</span>
{%- endif -%}
</div>
<a class="btn" href="{{ featured_product.url }}" role="button">{{ section.settings.txt_button }}</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /featured -->
{% schema %}
{
"name": "Featured Product Parallax",
"settings": [
{
"type": "header",
"content": "Parallax featured product"
},
{
"type": "image_picker",
"id": "img_product",
"label": "Section image"
},
{
"type": "text",
"id": "txt_button",
"label": "Button text",
"default": "View more"
},
{
"type": "product",
"id": "featured_product_handle",
"label": "Select product"
}
],
"presets": [
{
"name": "Featured Product Parallax",
"category": "Products"
}
]
}
{% endschema %}Pre-Deployment Safety Checklist for Shopify Merchants

Driss OUDMINE
Shopify Theme & App Developer specializing in Online Store 2.0 themes, custom Shopify apps, Shopify APIs (GraphQL/REST), and store speed optimization. Not available for new opportunities at this moment.
Let's discuss how I can contribute to your team.
I am not available for new opportunities at this moment. You can still reach out for general questions about my work and articles.
Direct Email
hello@doudmine.comCandidate Snapshot:
Fast Response (Within 24 Hours)
I personally monitor my inbox and respond to technical recruiters and engineering managers promptly.
Work Authorization & Setup
Ready for remote full-time employment via Deel, Oyster, Remote.com, or direct employment.
Flexible Notice Period
Able to join team sprints within 1–2 weeks upon agreement.