PRACTICAL WEB TIP
Corner Bracket — Back to Top Button
Corner geometry drawn with purpose rather than decoration. Engineering, industrial product and design practice websites.
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-2054 / Corner Bracket | paste before closing body -->
<button class="backtop tb-btt-button w2054" type="button" aria-label="Back to top"><span class="w54tl"></span><span class="w54br"></span><span class="w54arr">↑</span><span class="w54word">TOP</span></button>
/* TB-2054 / Corner Bracket */
.backtop{box-sizing:border-box;position:fixed;z-index:50;cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(12px);text-align:center;transition:opacity .24s, transform .28s, visibility .24s}.backtop.is-visible{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}.backtop.w2055.is-visible{transform:translate(-50%,0)}.backtop:focus-visible{outline:3px solid #e7ab4c;outline-offset:4px}
.w2054{right:28px;bottom:30px;width:72px;height:73px;background:#f8faf7e8;color:#275e69;border:0;backdrop-filter:blur(6px)}.w54tl,.w54br{position:absolute;width:28px;height:28px;border-color:#397580;border-style:solid;transition:width .3s,height .3s}.w54tl{top:0;left:0;border-width:2px 0 0 2px}.w54br{bottom:0;right:0;border-width:0 2px 2px 0}.w54arr{position:absolute;left:0;right:0;top:7px;font:400 35px Georgia,serif;transition:transform .28s}.w54word{position:absolute;left:0;right:0;bottom:13px;font:700 10px Arial,sans-serif;letter-spacing:.1em}.w2054:hover .w54tl,.w2054:hover .w54br{width:40px;height:40px}.w2054:hover .w54arr{transform:translateY(-4px)}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}
/* POLISH PASS 2026-10-18: alignment, tactile size, emphasis & individual character */
.backtop{isolation:isolate;-webkit-tap-highlight-color:transparent;}
.backtop:focus-visible{outline:3px solid #f0af42;outline-offset:4px;}
@media(prefers-reduced-motion:reduce){.backtop,.backtop *{transition-duration:.01ms!important;animation-duration:.01ms!important}}
.w2054{right:clamp(18px,3vw,46px);bottom:clamp(28px,5vh,66px);width:83px;height:84px;background:#f7fcf9f2;box-shadow:0 10px 24px #244a5725;}
.w2054 .w54arr{font-size:29px}.w2054 .w54word{letter-spacing:.21em;}
.w2054:hover{transform:translateY(-4px);background:#e1f0eb;}
@media(max-width:650px){.w2054{right:18px;bottom:26px;width:72px;height:74px}}
(()=>{'use strict';const button=document.querySelector('.backtop');if(!button)return;const footerOnly=button.classList.contains('footer-backtop');const reduced=matchMedia('(prefers-reduced-motion: reduce)');let scheduled=false;function update(){scheduled=false;if(footerOnly)return;const shown=window.scrollY>160;button.classList.toggle('is-visible',shown);button.classList.toggle('is-hidden',!shown);button.tabIndex=shown?0:-1;button.setAttribute('aria-hidden',String(!shown));if(button.classList.contains('w2056')){const max=Math.max(1,document.documentElement.scrollHeight-innerHeight);button.style.setProperty('--progress',(Math.round(Math.min(100,scrollY/max*100)))+'%');}}function onScroll(){if(!scheduled){scheduled=true;requestAnimationFrame(update)}}button.addEventListener('click',()=>window.scrollTo({top:0,behavior:reduced.matches?'instant':'smooth'}));addEventListener('scroll',onScroll,{passive:true});addEventListener('resize',onScroll,{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
Engineering, industrial product and design practice websites.
Technical Notes
Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.
Mobile:Check tap target and placement on mobile devices.
Browser:Test in your supported browsers.
Reduced Motion:CSS respects prefers-reduced-motion.