Find out how to make Superior Full Web page Scroll Impact utilizing html &css Utilizing HTML & CSS, step-by-step from scratch.
Let’s create a pleasant scroll animation with simply 4 traces of code!
Markup
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Appropriate" content material="IE=edge">
<meta identify="viewport" content material="width=device-width, initial-scale=1.0">
<title>CSS SNAP EFFECT</title>
<hyperlink rel="stylesheet" href="type.css">
</head>
<physique>
<div class="container">
<part class="one">
<h1>First Web page</h1>
</part>
<part class="two">
<h1>Second Web page</h1>
</part>
<part class="three">
<h1>Third Web page</h1>
</part>
<part class="4">
<h1>Net Dev</h1>
</part>
</div>
</physique>
</html>
CSS
@import url('https://fonts.googleapis.com/css2?household=Poppins&show=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
.container {
scroll-snap-type: y necessary;
overflow-y: scroll;
top: 100vh;
}
part {
top: 100vh;
show: flex;
justify-content: middle;
align-items: middle;
scroll-snap-align: begin;
}
h1 {
coloration: rgb(226, 226, 226);
text-shadow: 1px 1px 4px #000;
}
.one {
background-color: rgb(36, 164, 138);
}
.two {
background-color: rgb(211, 79, 79);
}
.three {
background-color: rgb(67, 91, 175);
}
.4 {
background-color: rgb(191, 64, 191);
}
🛴 Comply with me on:
Fb: https://bit.ly/3cp2S5W
YouTube: https://bit.ly/3oBQbc0