---
title: "Expand Sections on Scroll"
url: "https://wicky.co/expand-sections-on-scroll/"
type: "post"
published: "2022-08-25T09:04:27-04:00"
modified: "2022-08-25T09:04:27-04:00"
author: "wicky"
---

In this Elementor tutorial, I will show you how I was able to recreate the expanding sections on scroll effect from the Walmart + ([https://www.walmart.com/plus](https://www.walmart.com/plus)) website.

I learned a lot of new CSS tricks creating this video tutorial. I think this effect came out nice and I plan to use it in the future on client websites.

**Change Background Color On Scroll Video:**
[https://www.youtube.com/watch?v=QE7akMQ2xGk](https://www.youtube.com/watch?v=QE7akMQ2xGk)

**Sticky Scrolling Tab Effect Video:**
[https://www.youtube.com/watch?v=FB5XGftAj54](https://www.youtube.com/watch?v=FB5XGftAj54)

**Timestamps:**

- 0:00 Introduction
- 2:05 Tutorial Starts
- 3:54 JavaScript Code Explained
- 10:22 CSS Code Explained

## JavaScript Code:

```

```

## CSS Code:

```

					.section1,.section2,.section3,.section4{max-height: 0;overflow: hidden;}

.section1.showdiv,.section2.showdiv,.section3.showdiv,.section4.showdiv{
    transition-property: max-height;
    transition-duration: 700ms;
    transition-timing-function: ease-in-out;
    transition-delay: 0ms;
    overflow: hidden;
    max-height: 500px;
}

```
