To Create that Smooth Scrolling Effect, We will Use scroll-behavior property.
This tutorial can be followed by any Beginner very easily.
Code :
Result :
Output |
<!DOCTYPE html>
<html>
<head>
<title>Scrolling Effect Using CSS</title>
<style type="text/css">
*{
padding: 0px;
margin: 0px;
}
html{
scroll-behavior: smooth;
}
nav{
background-color: #0000002e;
position: fixed;
width: 100%;
}
nav ul{
text-align: center;
}
nav ul a li{
display: inline-block;
padding: 30px;
color: white;
transition: .2s;
}
li:hover{
background-color: white;
color: black;
}
.section{
height: 750px;
}
.section-1{
background-color: red;
}
.section-2{
background-color: tomato;
}
.section-3{
background-color: orange;
}
.section-4{
background-color: purple;
}
.section-5{
background-color: pink;
}
</style>
</head>
<body>
<nav>
<ul>
<a href="#section-1">
<li>Section 1</li>
</a>
<a href="#section-2">
<li>Section 2</li>
</a>
<a href="#section-3">
<li>Section 3</li>
</a>
<a href="#section-4">
<li>Section 4</li>
</a>
<a href="#section-5">
<li>Section 5</li>
</a>
</ul>
</nav>
<div class="container">
<div id="section-1" class="section section-1">
</div>
<div id="section-2" class="section section-2">
</div>
<div id="section-3" class="section section-3">
</div>
<div id="section-4" class="section section-4">
</div>
<div id="section-5" class="section section-5">
</div>
</div>
</body>
</html>
https://youtu.be/0RRUOIvmuWA I realized that I had my camera set up incorrectly, so when I upload…
https://youtu.be/C3oFfV20K_c Make Animated progress step bar using Figma
https://youtu.be/o3pSH_oRzko How to Hide All Grids in Figma
https://youtu.be/hdSUylKSsho How to Create Responsive Tool tip in Figma
https://youtu.be/AEiH7dSDhKo Having issue in figma pixel grid? learn how to show/ hide figma pixel grid…
https://youtu.be/iilYzHg9LwQ There are some issues going on in ventura OS its still in development phase…