Antwort
Javascript hilft:
//EXAMPLE 1 - from the article @ https://css-tricks.com/snippets/jquery/smooth-scrolling/
//URL does not update and element focus is lost
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 900);
//unchecken der Checkbox zum ausblenden der Navigation small
document.getElementById('hacky-input').checked = false;
return false;
}
}
});
});
Den link dann so gestalten:
#Beispiel
Es scrollt dann an die stelle mit der Gleichnamigen ID
IST EINE VON VIELEN WEGEN