DEV Community

Robson Muniz
Robson Muniz

Posted on • Updated on

📜Awesome Page Scroll Effect | HTML & CSS✨

How to make Awesome Full Page Scroll Effect using html &css Using HTML & CSS, step-by-step from scratch.
Let’s create a nice scroll animation with just 4 lines of code!


<!DOCTYPE html>
<html lang="en">

  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CSS SNAP EFFECT</title>
  <link rel="stylesheet" href="style.css">


  <div class="container">

    <section class="one">
      <h1>First Page</h1>

    <section class="two">
      <h1>Second Page</h1>

    <section class="three">
      <h1>Third Page</h1>

    <section class="four">
      <h1>Web Dev</h1>


Enter fullscreen mode Exit fullscreen mode


@import url('');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;

.container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;

section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;

h1 {
    color: 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);
.four {
    background-color: rgb(191, 64, 191);
Enter fullscreen mode Exit fullscreen mode

🛴 Follow me on:

Top comments (0)