5th Sep '22
/
1 comment

Oxygen’s Focus Section in Bricks

This Pro tutorial provides the steps to implement Focus Section, an Oxygen's composite element in Bricks.

As the focus section comes into the view, it zooms in smoothly with the other sections fading out and as it leaves the viewport, zooms out to its original size with the section below fading in.

We shall clean up the IntersectionObserver API's code and make it simpler and modern.

Step 1

Edit your Page/template with Bricks editor and add a few Sections.

In my test site, I added three - one above the focus section and one below it.

Add a class of focus-section to your focus section.

Add a Block inside the Section's Container.

Add a class of focus-section__content to this Block. Add your desired elements inside like perhaps a Heading and a Container having some columns.

Step 2

At Bricks → Settings → Custom code → Body (footer) scripts, add:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 633 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Horizontal Scrolling Tabs in Bricks

Horizontal Scrolling Tabs in Bricks

Nestable Tabs element in Bricks wraps into multiple lines out of the box at smaller viewport widths. This Pro tutorial provides the steps to remove…
Categories:
Tags:
Pro
CSS Grid for Posts Element in Bricks

CSS Grid for Posts Element in Bricks

The "Posts" element in Bricks has "Grid" as the default layout but the actual CSS it applies on the page feels hacky with negative margins…
Categories:
Pro
Mmenu Light in Bricks

Mmenu Light in Bricks

Here's the steps to implement Mmenu Light for a sliding OffCanvas mobile menu in Bricks.
Categories:
Pro
Ken Burns Background Slideshow in Bricks

Ken Burns Background Slideshow in Bricks

Setting up a hero section, having images that pan and move as a background slideshow with content on top.
Categories:
Tags:
Pro
Codrops Dynamic Shape Overlay in Bricks

Codrops Dynamic Shape Overlay in Bricks

This Pro tutorial provides the steps to implement Codrops' SVG shape overlay in Bricks. We shall display a WordPress menu in the overlay after an…
Categories:
Pro
Stacking Post Cards in Bricks

Stacking Post Cards in Bricks

How we can stack posts in a query loop so they stick on top of the previous one when scrolling.
Categories:
Tags:
Pro
Masonry + Click-type Infinite Scroll in Bricks

Masonry + Click-type Infinite Scroll in Bricks

This Pro tutorial provides the steps to lay out posts in a masonry style with a View More button, which, when clicked, loads the next…
Categories: