Bonjour J'ai probleme de fleche top, quand j'accède a un page par mon moteur recherche elle à disparu ! si je vais directement elle y est toujours ? Quel code appliquer sur cette page pour la rétablir ? merci
J'y met ça mais c'est moche : <a id="btnTopFinal" href="#" title="Remonter en haut" style="display:none; position:fixed; bottom:25px; right:25px; width:52px; height:52px; background:#0d6efd; color:white; border-radius:50%; text-align:center; line-height:52px; font-size:30px; text-decoration:none; z-index:99999; box-shadow:0 3px 12px rgba(0,0,0,0.4);">↑</a>
<script>
(function(){
var btn=document.getElementById('btnTopFinal');
if(!btn) return;
window.addEventListener('scroll', function(){
btn.style.display = (window.scrollY > 350) ? 'block' : 'none';
});
btn.addEventListener('click', function(e){
e.preventDefault();
window.scrollTo({top:0, behavior:'smooth'});
});
})();
</script>