search
HomeWeb Front-endCSS TutorialUnraveling the magical effect Behind the KPR Verse Footer Effect

Unraveling the magical effect Behind the KPR Verse Footer Effect
I was scrolling through the KPR-verse website when I noticed this cool effect at the bottom. Whenever I see something like this, I always want to recreate it. My process is simple: I start by trying to replicate the effect, then make a blog to explain how it’s done, aiming to break down complex designs into easy-to-understand steps.

At first, I often doubt whether I can pull it off, but after some deep thought, I usually find a way to break the design into pieces. By connecting those pieces, I manage to achieve the effect. Enough talk — let’s dive into how you can make it yourself!

Breaking Down the KPR Verse Footer Effect

At the end of the site, you’ll find the KPR banner in the background. At first glance, it might seem a bit complex, but it’s not that complicated.

Unraveling the magical effect Behind the KPR Verse Footer Effect

First, create a div with the class .container. This will be the root element for our tutorial.

Unraveling the magical effect Behind the KPR Verse Footer Effect

Next, divide the .container into two parts: .subcontainer-wrapper and footer. The footer element will hold the KPR banner.

Unraveling the magical effect Behind the KPR Verse Footer Effect

Now, further divide the .subcontainer-wrapper into two parts. The upper part contains all the content for our website, while the lower part is left blank with no background—essentially invisible, but it still has the width and height of the viewport. The lower half is crucial because it allows us to see the footer.

Up to this point, all the elements are in the normal HTML flow, i.e., top-to-bottom. Now, we need to break this order by placing the footer behind and bringing the .subcontainer-wrapper in front. To do this, we'll set the .subcontainer-wrapper to position: absolute relative to its parent .container. This will remove the .subcontainer-wrapper from the normal DOM flow.

Unraveling the magical effect Behind the KPR Verse Footer Effect

That’s all we need to set up the effect. Now, fill the upper part of the .subcontainer-wrapper with content, but leave the lower part—the invisible div—empty. Also, add content to the footer.

Once you’ve added the content, it should look something like this.

Unraveling the magical effect Behind the KPR Verse Footer Effect

The upper part hides the background, and as you scroll down, when the visible content ends, the invisible section reveals the footer. Voilà! There you have it — simple and easy.

Unraveling the magical effect Behind the KPR Verse Footer Effect

_Thanks for following along! I hope you found this guide helpful and easy to understand. Stay curious and keep exploring!

original: KPR-verse

Demo site: Demo Link , For this demonstration, I used the Google I/O site (https://io.google/2024/) and adapted it to showcase a similar concept.

Source code: Github Link_

The above is the detailed content of Unraveling the magical effect Behind the KPR Verse Footer Effect. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
A Little Reminder That Pseudo Elements are Children, Kinda.A Little Reminder That Pseudo Elements are Children, Kinda.Apr 19, 2025 am 11:39 AM

Here's a container with some child elements:

Menus with 'Dynamic Hit Areas'Menus with 'Dynamic Hit Areas'Apr 19, 2025 am 11:37 AM

Flyout menus! The second you need to implement a menu that uses a hover event to display more menu items, you're in tricky territory. For one, they should

Improving Video Accessibility with WebVTTImproving Video Accessibility with WebVTTApr 19, 2025 am 11:27 AM

"The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect."- Tim Berners-Lee

Weekly Platform News: CSS ::marker pseudo-element, pre-rendering web components, adding Webmention to your siteWeekly Platform News: CSS ::marker pseudo-element, pre-rendering web components, adding Webmention to your siteApr 19, 2025 am 11:25 AM

In this week's roundup: datepickers are giving keyboard users headaches, a new web component compiler that helps fight FOUC, we finally get our hands on styling list item markers, and four steps to getting webmentions on your site.

Making width and flexible items play nice togetherMaking width and flexible items play nice togetherApr 19, 2025 am 11:23 AM

The short answer: flex-shrink and flex-basis are probably what you’re lookin’ for.

Position Sticky and Table HeadersPosition Sticky and Table HeadersApr 19, 2025 am 11:21 AM

You can't position: sticky; a

Weekly Platform News: HTML Inspection in Search Console, Global Scope of Scripts, Babel env Adds defaults QueryWeekly Platform News: HTML Inspection in Search Console, Global Scope of Scripts, Babel env Adds defaults QueryApr 19, 2025 am 11:18 AM

In this week's look around the world of web platform news, Google Search Console makes it easier to view crawled markup, we learn that custom properties

IndieWeb and WebmentionsIndieWeb and WebmentionsApr 19, 2025 am 11:16 AM

The IndieWeb is a thing! They've got a conference coming up and everything. The New Yorker is even writing about it:

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!