TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Made a scroll bar buddy that walks down the page when you scroll

626 点作者 hello123432142 个月前

61 条评论

psygn892 个月前
Nice! I had an idea that I never coded up. Basically a hamster with a parachute that would fall slowly to the bottom of the page. If you scroll down fast his parachute will deploy to catch up and land once again at the bottom of the viewport. He'll hold a "Top" sign when you hover over him and will shoot off with a jetpack when you click on him and as the screen hits the top you'll see him deploy a parachute again to gently land at the bottom of the screen.
评论 #43239646 未加载
评论 #43239226 未加载
评论 #43240302 未加载
评论 #43240959 未加载
评论 #43239101 未加载
评论 #43239363 未加载
jsheard2 个月前
This kind of thing should probably be disabled if the user has prefers-reduced-motion set.<p><a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;@media&#x2F;prefers-reduced-motion" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;@media&#x2F;pref...</a><p>It just needs one extra CSS rule to make the guy invisible when appropriate:<p><pre><code> @media (prefers-reduced-motion) { #scrollBuddy { visibility: hidden; } }</code></pre>
评论 #43237940 未加载
评论 #43237810 未加载
评论 #43241068 未加载
评论 #43242853 未加载
评论 #43237869 未加载
评论 #43237798 未加载
评论 #43244899 未加载
评论 #43244816 未加载
评论 #43237878 未加载
评论 #43238159 未加载
评论 #43237818 未加载
robotsquidward2 个月前
How has nobody said that this should be called &#x27;Stroll Bar&#x27;????
评论 #43261649 未加载
评论 #43242753 未加载
hello123432142 个月前
Instead of a boring scrollbar thought it would be fun to have an animated stick figure that walks up and down the side of your page when you scroll.<p>This is the first prototype i made.<p>Going to make a skateboarder, rock climber, or squirrel next. what other kinds of scroll buddies should I make?
评论 #43237722 未加载
评论 #43238492 未加载
评论 #43237881 未加载
评论 #43237734 未加载
评论 #43237719 未加载
评论 #43237838 未加载
评论 #43239865 未加载
评论 #43238867 未加载
评论 #43238456 未加载
评论 #43242475 未加载
评论 #43237768 未加载
评论 #43241054 未加载
评论 #43239243 未加载
评论 #43237836 未加载
评论 #43237584 未加载
评论 #43241062 未加载
评论 #43239930 未加载
评论 #43245755 未加载
评论 #43238695 未加载
brysonreece2 个月前
Surprised I seem to be the only one willing to ask; _why in the world would you wall the implementation behind a Google Form?_<p>Edit: Implementation details are actually readily accessible in the DOM. Here&#x27;s a gist that extracts the relevant details (for those who, understandably, don&#x27;t want to give out their email in exchange):<p><a href="https:&#x2F;&#x2F;gist.github.com&#x2F;brysonreece&#x2F;b15f33cda30af06b7b70788d10b631ce" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;brysonreece&#x2F;b15f33cda30af06b7b70788d...</a>
评论 #43239182 未加载
评论 #43238676 未加载
评论 #43238007 未加载
评论 #43238209 未加载
kmoser2 个月前
What am I missing? I don&#x27;t see anything except the scroll bar itself, on both Firefox and Chrome. Do my custom scroll bar colors have something to do with it?
评论 #43239032 未加载
评论 #43241347 未加载
评论 #43242866 未加载
评论 #43241285 未加载
rcfox2 个月前
Reminds me of the late 90s when people would add effects to their websites, like snow or trails of sparks that follow the mouse.
评论 #43239357 未加载
评论 #43270494 未加载
评论 #43242347 未加载
a12k2 个月前
This sort of project reminds me of the old internet. I love it.
评论 #43237833 未加载
评论 #43237705 未加载
评论 #43237742 未加载
kwar132 个月前
Why is this behind a google form...? There isn&#x27;t even a screenshot of what it looks like before collecting an email address. What a strange post to hit front page.
评论 #43241117 未加载
评论 #43241121 未加载
评论 #43241097 未加载
pentagrama2 个月前
This is funny and clever.<p>If I were a developer, I would make a version where, when the stick figure moves backward as you scroll up, it does the moonwalk.
评论 #43237962 未加载
评论 #43238011 未加载
hmmm-i-wonder2 个月前
This highlights just how useless and unusable existing scroll bars are.<p>The ability to easily see where you were on the page was great. And it&#x27;s got some humour. I love it.
hu32 个月前
It doesn&#x27;t render for me on any of these:<p>- Chrome on Windows 11<p>- Firefox on Windows 11<p>- Chrome on Android<p>- Firefox on Android<p>Also no JS errors on console.<p>Maybe I&#x27;m doing something wrong?<p>I tried in both Ultrawide and traditional FullHD screens.
评论 #43238208 未加载
Animats2 个月前
Anybody remember Comet Cursor?[1]<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Comet_Cursor" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Comet_Cursor</a>
wenjian2 个月前
I made a simple javascript by copying your code so that I can add this cute guy on my website, please let me know if this is not OK (<a href="https:&#x2F;&#x2F;github.com&#x2F;jwenjian&#x2F;scroll-buddy">https:&#x2F;&#x2F;github.com&#x2F;jwenjian&#x2F;scroll-buddy</a>)
dwags2 个月前
Sisyphus when using infinite scroll?
评论 #43239434 未加载
ja22 个月前
Finally a useful piece of software that doesn&#x27;t require a monthly subscription. Count me in.
gavmor2 个月前
Ooh, how novel, and we&#x27;ll-executed. I imagine this might be useful in conjunction with a minimap as &quot;terrain&quot;.<p>Useful, that is, in terms of getting a proprioceptive &quot;feel&quot; for the anatomy&#x2F;topography of a document.
评论 #43241313 未加载
khaledh2 个月前
This is nice. It reminds me of old Windows desktop pets: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=CosQ1n7k6lw" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=CosQ1n7k6lw</a>
xyztimm2 个月前
Next version: stick man is context aware and does different actions based on the content, for example it jumps whenever the user scrolls to an h2.
beardyw2 个月前
I am not sure about walking on a moving thing. I would like to see a kind of surfboard action, balancing only when it moves.<p>Over to you!
diebeforei4852 个月前
It looks wrong when scrolling up. The direction of the feet makes it look like walking backwards in a very strange way.
iamben2 个月前
Haha, this is great fun. Scratching my own itch and making him turnaround when you scroll up:<p><pre><code> &#x2F;* Add style *&#x2F; #scrollBuddy.walkUp { transform: rotate(-90deg) scaleX(-1); } &#x2F;* Amend script *&#x2F; var lastTop = 0; function updateBuddyVerticalPosition(scrollPosition) { &#x2F;&#x2F; All as before but add the below before requestAnimationFrame if (lastTop &lt;= newTop &amp;&amp; buddy.classList.contains(&#x27;walkUp&#x27;)) { buddy.classList.remove(&#x27;walkUp&#x27;) } else if (lastTop &gt; newTop) { buddy.classList.add(&#x27;walkUp&#x27;) } lastTop = newTop; }</code></pre>
andirk2 个月前
The act of scrolling is only noticeable by the browser + Javascript per whatever cycle it&#x27;s on; it&#x27;s not always watched except for at certain checkpoints.<p>To more accurately be affected by quick scrolls, save the last known y-axis value and compare to the current y-axis value. Act accordingly!
prajwal-s-x2 个月前
Nice, I&#x27;m not sure if someone already suggested, reverse the toe direction when scrolling up.
IncreasePosts2 个月前
I suspect either OP wasn&#x27;t using the internet in 2001,or they were using the internet in 2001.
评论 #43246242 未加载
Mizu_0482 个月前
cool screenmate could definitely be added as a userscript like <a href="https:&#x2F;&#x2F;greasyfork.org&#x2F;en&#x2F;scripts&#x2F;465955-oneko-webmate" rel="nofollow">https:&#x2F;&#x2F;greasyfork.org&#x2F;en&#x2F;scripts&#x2F;465955-oneko-webmate</a>
ramathornn2 个月前
This is awesome, thanks for sharing it. I love how creative&#x2F;random it is, a real gem imo!
评论 #43239086 未加载
sergiotapia2 个月前
Really cool thank for sharing! I tweaked the code a bit so that I could get Mario sliding down the flag pole for my gaming website. <a href="https:&#x2F;&#x2F;www.gamedrop.gg&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.gamedrop.gg&#x2F;</a>
评论 #43238822 未加载
AnonHP2 个月前
Please change the direction of walking when scrolling up. Right now the stick figure is walking backwards. It could be reversed or perhaps made to seem like backtracking (add a little more “caution”, “fear”, etc.).
评论 #43238096 未加载
I_am_tiberius2 个月前
I tried it in 3 browsers but dont see anything in anyone of them.
fitsumbelay2 个月前
love this. would also love to see the direction of scroll and scroll speed reflected in character&#x27;s behavior, ie walking up or down and walking vs running respectively.<p>I often wonder why corporate engagements (advertisements) aren&#x27;t wrapped in something like this. people are always looking for distractions even while they&#x27;re in the middle of a distraction so a fun interaction that starts out by getting your attention like this would seem to make sense. anyway, this is cool
SubiculumCode2 个月前
I like it, I just wish I could grab it to scroll too. Scroll bars are hard to grab these days as GUIs try to save space by making them one or two pixels thick.
endofreach2 个月前
Dear god, please never screw up the x-overflow...<p>(or... do it, and see if these artificial beings are already more powerful than us and can&#x27;t be stopped...)
tweakimp2 个月前
Can you make him moonwalk when you scroll up?
Etherlord872 个月前
I don&#x27;t see anything in Firefox on Windows. I tried adding `ui.prefersReducedMotion` setting as FALSE, nothing.
评论 #43239871 未加载
sandreas2 个月前
Super cool. The next way is to implement a Breakout game sideways which you can control by scrolling up and down :-)
boredatoms2 个月前
I remember when scrollbars were just visible all the time, everywhere you went, no special support needed
评论 #43246221 未加载
thymehog2 个月前
hmm... doesn&#x27;t seem to be working in Chrome 122.0.6261.128 (Official) or Firefox 135.0.1
EGreg2 个月前
Speaking of how the guy starts out on one side of the scrollbar and “walks” to the other, a decade ago I programmed a “scroller” js tool (behavior) that I could add to any element. It basically made it so that when I pressed a trigger with my finger, a menu would appear under it, and then I could move the finger without lifting it until I reached the item I want and release. The memu would scroll under my finger, so that if I reached the bottom (minus a margin) it would already be scrolled all the way to the bottom. Same kind of math as the guy here.<p>I was tired of having to tap, then scroll, then tap again, on phones. Yes, I really made sure that mode worked too, but the “hidden mode” was to get the selection done in one swipe! Just like I could always do on a Mac, in one mouse swipe!<p>For mouse interaction - you didn’t even need to press, move and release. You’d hover over the trigger element and then move your mouse down, then click. In that case the menu would disppear if you moved the pointer out of it.<p>You don’t have to imagine, just try the Developer menu on <a href="https:&#x2F;&#x2F;Qbix.com" rel="nofollow">https:&#x2F;&#x2F;Qbix.com</a> for instance (the menu isn’t long enough but try turning your phone horizontally to make vertical space more limited.. or the tech savvy among you can use Safari debugger to copypaste some more menu items into that menu).<p>By the way, I now have dozens or hundreds of such “tools” I use to create interfaces. Menus. Dialogs. Tooltips. Onboarding Hints. Speech. Tabs. Chatrooms. Live videoconferencing. Peer to peer broadcast that’s uncensorable. Ok that escalated fast :) <a href="https:&#x2F;&#x2F;intercoin.app" rel="nofollow">https:&#x2F;&#x2F;intercoin.app</a> as an example.
rkagerer2 个月前
But you can&#x27;t grab him and move him (to scroll past large chunks).
stevage2 个月前
Didn&#x27;t seem to animate on Firefox android.<p>Also it was invisible with Dark Reader.
评论 #43238121 未加载
Laydan2 个月前
Would be cool if you make him run when the scroll becomes faster
dietsche2 个月前
really cool. On mobile devices, I would suggest inverting his movement So that he matches the way someone scrolls with their finger.
napolux2 个月前
why should I give you my email to get this?
iandanforth2 个月前
Can he turn around when you scroll back up?
评论 #43237880 未加载
评论 #43237709 未加载
neycoda2 个月前
Macs hate it when you do this...
hacsky2 个月前
I hope to see a % scrolled please :)
GlassOwAter2 个月前
Fun! He’s a great speed walker too
评论 #43237640 未加载
sam0x172 个月前
users of dark reader: the buddy is invisible if you have dark mode turned on
pmg1012 个月前
Would be cool if you could play one sided pong with the scrollbar and bounce a ball around the window.
buss_jan2 个月前
This is oddly delightful :)
concerndc1tizen2 个月前
Lots of positive comments.<p>Allow me to share a different perspective:<p>I hate this.<p>I long for serious content and straightforward UX, and less on gimmicks. The modern scrollbars is a good example of how terrible UX has become, which is obvious when comparing to the design principles of the 90s.<p>The smartphone dominates UX today. I suspect the reason why scrollbars disappeared was to save pixels on low-resolution smartphone screens. And now we&#x27;re stuck with it.
评论 #43242057 未加载
0XAFFE2 个月前
Now combine it with elevatorjs:<p><a href="https:&#x2F;&#x2F;tholman.com&#x2F;elevator.js&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tholman.com&#x2F;elevator.js&#x2F;</a>
Quizzical42302 个月前
It&#x27;s very cute!
rowenaluk2 个月前
This is awesome.
maxglute2 个月前
Need some sort of dancing gif, maybe user upload. Should fully stop &#x2F; reset position when not scrolling. Also someone make AI bonzai buddy.
masterkswan2 个月前
I like it, quickly tried to scroll back looking for the moonwalk, lol
评论 #43237712 未加载
fHr2 个月前
amazing!
colordrops2 个月前
I rarely literally LOL to HN posts but this one did it for me.
donatj2 个月前
I love this. I miss lighthearted things like this being more of the norm than the exception. Xeyes on 90s Linux, cowsay, whatever that was that made snow gather on top your windows (Xsnow?). Heck, I even have fond memories of Björks website having an animated bee that would follow you around. I think he was named Meesta Bee or something similar.<p>Everything is so dang serious all the time, I miss the sense of levity and wonder that used to follow tech around.
评论 #43241351 未加载
评论 #43241776 未加载
评论 #43241989 未加载
评论 #43242062 未加载
TylerE2 个月前
Sorry, but I find this <i>incredibly</i> distracting and unpleasant to me. Yanks my focus every time I scroll. Any site using it is an instant back button for me.
评论 #43239169 未加载
评论 #43238025 未加载
评论 #43237711 未加载