<div class="container">
<div class="intro">
<h2>Welcome</h2>
</div>
<main>
<div class="content">
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
<p>Hello</p>
</div>
</main>
</div>
* {
box-sizing: border-box;
margin: 0;
}
h1 {
margin: 1rem 0;
}
h2 {
color: white;
opacity: 0;
font-size: 5rem;
animation: fadeIn 2s ease forwards;
}
p {
font-size: 4rem;
opacity: 0;
animation: fadeInText 2s ease forwards 3s;
}
.intro {
height: 100vh;
background-color: black;
display: flex;
justify-content: center;
align-items: center;
}
main {
position: absolute;
top: 0;
height: 100vh;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: mistyrose;
transform: scale(0, 0);
animation: animate 1s ease-in forwards 2s;
overflow: hidden;
}
.content {
width: 100%;
text-align: center;
overflow-y: auto;
}
@keyframes animate {
0% {
transform: scale(0, 0.005);
}
50% {
transform: scaleY(0.005);
}
100% {
transform: scale(1, 1);
}
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(50%);
}
to {
opacity: 1;
transform: translateY(-50%);
}
}
@keyframes fadeInText {
from {
opacity: 0;
transform: translateY(50%);
}
to {
opacity: 1;
transform: translateY(0%);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.