I'm talking about the "curtain reveal" effect that's commonly achieved by having a position fixed or absolute element stay on the bottom with a higher placed (z-index) element above it.
Something like this: http://cssdeck.com/labs/niasr9l8 or https://www.thecssninja.com/demo/css_reveal/
The problem with both of these methods, is that they only allow revealing images. Is it possible to reveal entire fixed position (top:0) HTML when scrolling with pure CSS? Thanks!
also, here is my current attempt in case it helps (I want the different text to stay static while scrolling, but get revealed while scrolling):
.section {
height: 100vh;
color: white;
overflow: hidden;
}
.section .static-container {
position: relative;
top: 0;
height: 100vh;
width: 100%;
}
.section:nth-child(1) {
z-index: 1;
}
.section:nth-child(1) .static-container {
background-color: green;
}
.section:nth-child(2) {
z-index: 2;
}
.section:nth-child(2) .static-container {
background-color: blue;
}
.section:nth-child(3) {
z-index: 3;
}
.section:nth-child(3) .static-container {
background-color: red;
}
.section:nth-child(4) {
z-index: 4;
}
.section:nth-child(4) .static-container {
background-color: yellow;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<section class="section">
<div class="static-container">
<div class="container">
<h1>Hello World</h1>
</div>
</div>
</section>
<section class="section">
<div class="static-container">
<div class="container">
<h1>Lorem Ipsum</h1>
</div>
</div>
</section>
<section class="section">
<div class="static-container">
<div class="container">
<h1>Hello World</h1>
</div>
</div>
</section>
<section class="section">
<div class="static-container">
<div class="container">
<h2>Lorem Ipsum</h2>
</div>
</div>
</section>