how can one gently scroll to #name in a long html page ?
I would like when I click on a link to scroll to a point in the page, how can I scroll gently ? using a transition feature - like ease-in ?
Clicking on "a" - to go to next page - but slowly. same as when I click on "b" it should go back up ease-in.
body {
font-size: 20vh;
text-align: center;
vertical-align: middle;
line-height: 20vh;
}
.aa {
height: 100vh;
background: #ccc
}
.bb {
height: 100vh;
background: #fdf
}
a {
text-decoration: none;
-webkit-animation: moveFromLeft .6s ease both;
animation: moveFromLeft .6s ease both;
}
html a
<div class="bb">
<a name="xx"></a>
<a href="#yy">b</a>
</div>