PRACTICAL WEB TIP
Footer Handoff — Beginning Again
A large footer-integrated link returns visitors to the page beginning.
Design Preview
See the design above before trying the scroll interaction.
Live Demo
Press Try scrolling inside the frame, or scroll inside it. The button appears at the lower right and returns you to the top.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
<!-- TB-2069 / Footer Handoff / フッター導線 | paste before the closing body tag (inside the footer for TB-2069) -->
<button aria-label="ページの先頭へ戻る" class="footer-return tb-btt-2069" type="button"><span class="footer-return-sub">ONE MORE TIME</span><span class="footer-return-main">はじまりに<br/>もどる<span class="sea-line"></span></span></button>
/* 2069 / production button rules only */
.tb-btt-2069{box-sizing:border-box;font:inherit;cursor:pointer}.tb-btt-2069 :is(span,i,em,b,small,img){box-sizing:border-box}
.footer-return.tb-btt-2069:focus-visible{outline:3px solid #f0af43;outline-offset:5px}.footer-return.tb-btt-2069{display:block;background:transparent;color:#f5f0e3;border:0;border-top:1px solid #9bb4af;width:100%;padding:30px 0 13px;cursor:pointer;text-align:left;position:relative;overflow:hidden}.tb-btt-2069 .footer-return-sub{display:block;font:700 11px/1 Arial;letter-spacing:.25em;color:#a6cac3}.tb-btt-2069 .footer-return-main{font:500 clamp(35px,5vw,68px)/1.25 Georgia,serif;letter-spacing:.04em;display:block;margin-top:19px}.tb-btt-2069 .sea-line{display:inline-block;vertical-align:middle;margin-left:25px;height:3px;width:75px;background:#c7d8cf;position:relative;transition:width .45s}.tb-btt-2069 .sea-line:after{content:"";position:absolute;right:0;top:-7px;border-right:2px solid #c7d8cf;border-top:2px solid #c7d8cf;width:14px;height:14px;transform:rotate(45deg)}.footer-return.tb-btt-2069:hover .sea-line{width:140px}.footer-return.tb-btt-2069:focus-visible{outline-offset:-4px}@media (max-width:600px){.tb-btt-2069 .footer-return-main{font-size:36px}.tb-btt-2069 .sea-line{width:44px;margin-left:14px}}
@media(prefers-reduced-motion:reduce){.tb-btt-2069,.tb-btt-2069 *{animation-duration:.01ms!important;transition-duration:.01ms!important}}
(()=>{'use strict';const target=document.querySelector('.btt, .footer-return');if(!target)return;const isFooter=target.classList.contains('footer-return');const reduced=matchMedia('(prefers-reduced-motion: reduce)');let active=false;const update=()=>{const y=window.scrollY;const p=Math.max(0,Math.min(1,y/Math.max(1,document.documentElement.scrollHeight-innerHeight)));if(!isFooter){const visible=y>160;target.classList.toggle('is-visible',visible);target.setAttribute('aria-hidden',String(!visible));target.tabIndex=visible?0:-1;}target.style.setProperty('--pct',p.toFixed(3));const txt=target.querySelector('[data-progress]');if(txt)txt.textContent=String(Math.round(100*p)).padStart(2,'0')+'%';};const scroll=()=>{if(active)return;active=true;requestAnimationFrame(()=>{active=false;update()})};target.addEventListener('click',()=>window.scrollTo({top:0,behavior:reduced.matches?'instant':'smooth'}));addEventListener('scroll',scroll,{passive:true});addEventListener('resize',scroll,{passive:true});update();})();
How to Use
Insert the HTML button near the end of body, load the CSS, and include JavaScript using defer. Test scrolling, returning to the top, and positioning on mobile.
Use Case
Artisan studio and editorial footer layouts.
Technical Notes
Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.
Mobile:Check tap target, visibility and positioning on small screens.
Browser:Designed for current Chrome, Edge, Firefox and Safari.
Reduced Motion:CSS animations respect the reduced-motion preference.