Sticky and hidey hlavička ?
<script>
var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos) {
document.getElementById("header").style.top = "0";
} else {
document.getElementById("header").style.top = "-" + document.getElementById('header').offsetHeight + "px";
}
prevScrollpos = currentScrollPos;
}
</script>
<style>
#header {
transition: top 0.3s;
}
</style>