css on scroll code example
Example 1: smooth scroll css
html {
scroll-behavior: smooth;
}
http://iamdustan.com/smoothscroll/
Example 2: css no overflow
div.ex1 {
overflow: scroll;
}
div.ex2 {
overflow: hidden;
}
div.ex3 {
overflow: auto;
}
div.ex4 {
overflow: visible;
}
Example 3: scroll down style
<script type="text/javascript">
$window.scrollTop(function(){
var a = 112;
var pos = $window.scrollTop();
if(pos > a) {
$("menu").css({
position: 'fixed'
});
}
else {
$("menu").css({
position: 'absolute',
top:'600px'
});
}
});
</script>