PRACTICAL WEB TIP
Origin Pulse — Page Zero
An animated origin indicator brings visitors back to page zero.
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-2082 / Back to Top: insert before closing body (inside footer for TB-2083) -->
<button type="button" class="tb-btt bt2082" data-backtop aria-label="研究の原点、ページの先頭へ戻る"><span class="origin-track"><i class="satellite"></i><i class="origin-dot"></i></span><span class="origin-label">PAGE<br><b>00</b><em>START</em></span></button>
/* TB-2082 : paste only this CSS into the target page. */
.tb-btt{border:0;cursor:pointer;z-index:30;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:transform .35s,opacity .3s,background .3s,color .3s,box-shadow .3s;pointer-events:none;opacity:0;visibility:hidden}.tb-btt.is-visible{pointer-events:auto;opacity:1;visibility:visible}.tb-btt:focus-visible{outline:3px solid #f9af4b;outline-offset:5px}.only-at-end{opacity:1;visibility:visible;pointer-events:auto}
@keyframes orbital{to{transform:rotate(360deg)}}
.bt2082{position:fixed;bottom:21px;left:22px;width:126px;height:104px;background:#102e35;color:#e9fff5;border:1px solid #7bcbb999;border-radius:16px;box-shadow:0 10px 24px #0008;display:flex;align-items:center;padding:10px;gap:8px}
.origin-track{position:relative;width:62px;height:62px;border:2px solid #75c0b4;border-radius:50%;display:block;background:repeating-radial-gradient(circle,#61b4a217 0 9px,transparent 10px 20px)}
.origin-dot{position:absolute;left:50%;top:50%;width:9px;height:9px;border-radius:50%;background:#b0ffdd;transform:translate(-50%,-50%)}
.satellite{position:absolute;width:10px;height:10px;background:#e5fba7;border-radius:50%;top:0;left:50%;margin-left:-5px;transform-origin:5px 31px;animation:orbit 4s linear infinite;box-shadow:0 0 10px #caff9a}
@keyframes orbit{to{transform:rotate(360deg)}}
.origin-label{font:10px/1.3 monospace;letter-spacing:.08em}
.origin-label b{display:block;font:normal 27px/1 monospace;color:#a3fad1}
.origin-label em{font:normal 8px/1 monospace;letter-spacing:.04em}
.bt2082:hover{background:#1a5056;transform:translateY(-7px)}
@media (max-width:700px){.bt2082{left:11px;bottom:12px;width:106px;height:89px}.origin-track{width:52px;height:52px}}
@media(prefers-reduced-motion:reduce){.tb-btt,.tb-btt *{animation-duration:.01ms!important;transition-duration:.01ms!important}}
(()=>{'use strict';const control=document.querySelector('[data-backtop]');if(!control)return;const reduced=matchMedia('(prefers-reduced-motion: reduce)');const footer=control.classList.contains('only-at-end');let busy=false;function refresh(){busy=false;const max=Math.max(1,document.documentElement.scrollHeight-window.innerHeight);const p=Math.min(1,scrollY/max);document.documentElement.style.setProperty('--page-progress',p.toFixed(4));if(!footer){const show=scrollY>145;control.classList.toggle('is-visible',show);control.tabIndex=show?0:-1;control.setAttribute('aria-hidden',String(!show));}const number=document.querySelector('[data-progress-number]');if(number)number.textContent=Math.round(p*100)+'%';}function onscroll(){if(!busy){busy=true;requestAnimationFrame(refresh)}}addEventListener('scroll',onscroll,{passive:true});addEventListener('resize',onscroll,{passive:true});control.addEventListener('click',()=>window.scrollTo({top:0,behavior:reduced.matches?'instant':'smooth'}));refresh();})();
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
Laboratories, research and technology sites.
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.