Pure CSS Parallax Scrolling | No JavaScript | HTML & CSS

Codegrid · 736K views · 2018 · 5:37

Open on YouTube

Web developmentUX & UI designtutorial

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they followed when asking why their pure CSS parallax layout breaks, such as text hiding under the parallax image.

Recommended by 0 people across 0 different months, 2018 to 2021.

What it is

A short tutorial from the Codegrid channel showing how to build a parallax scrolling effect using only HTML and CSS, with no JavaScript. It relies on CSS perspective and 3D transforms on a scrolling container.

What people said

Cites SchadeM · 2018-05 · Stack Overflow · on “Parallax code not working, not showing up in chrome preview”

I am trying to make a parallax for the first time and am having troubles. I'm following this [this video] tutorial and then trying to work backwards. The code isn't working however and I'm not sure where I made the mistake, I jumped around to a few other tutorials and tried to adjust the names of different divs and CSS blocks so the code is a bit messy right now. .html { height: 100%; overflow: hidden; } .body { max-width: 30px color: #fff; margin: 0; padding: 0; perspective: 1px; transform-style: preserve-3d; height: 100% overflow-y: scroll; overflow-x: "Luna" } header { box-sizing: border-box; min-height: 100vh; padding 30vw 0 5vw; position: relative; transform-style: inherit; width: 100vw; } h

Cites Marcell · 2018-08 · Stack Overflow · on “Pure CSS Parallax - Text Hiding Under Parallax Picture After Scrolling”

The effect Im trying to replicate is this one: [this video] When I put a text bellow there, my text goes behind the parallax! :(

Cites Dan · 2021-01 · Stack Overflow · on “Parallax effect, text hiding under photo”

I am trying to implement a parallax effect, but, if I create some content like text, tabs etc., they're hiding under the photo. I followed a [this video] , took it step-by-step, but it doesn't work. HTML <head> <meta charset="UTF-8"> <meta name="viewport" content="widht=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Detail Software</title> <link rel = "icon" href = "obrazky/DSico.ico" type = "image/x-icon"> <link rel="stylesheet" href="style.css"> </head> <body> <header> <h1>Detail Software</h1> <p>Sense for detail.</p> </header> <div class="text"> <h3>Forbes is an American business magazine owned by Integrated Whale Media Investments and the Forbes