DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for This is probably the funniest Codepen I found this year!
Simon Holdorf
Simon Holdorf

Posted on

This is probably the funniest Codepen I found this year!

This is rather a short post but I find this codepen by BΓ₯rd N Hovde so awesome that I must share it with you:

Amazing what you can do with JavaScript and CSS, agree?

Please leave a comment if you like this as well or managed to hit the button. Also don't forget to follow me here and on Twitter for more upcoming posts!

Top comments (59)

Collapse
 
chrisachard profile image
Chris Achard • Edited on

Ha, I saw this other day - it's fantastic :)

For anyone looking in the code for the 'trick' (of hiding the mouse), it's done by setting the cursor in JS on this line:

const screenStyle = cursorGrabbed ? { cursor: "none" } : {};

and then the fake mouse pointer is part of the hand graphic. Brilliant!

Collapse
 
savagepixie profile image
SavagePixie

Oh, so there is a cursor trick! I've seen it on my mobile, where you can obviously just tap on things, so I hadn't caught on this feature.

Collapse
 
sanjaysupanch profile image
sanjaysupanch

oSM

Collapse
 
xtrp profile image
Gabriel Romualdo • Edited on

Pretty fun, with a combination of fast mouse movements and right-click trickery, I managed to produce a waving hand without changing any of the code.

Waving Hand Demo

β€” Gabriel

Collapse
 
pepas24 profile image
Sebastian Gutierrez

I just pass the mouse very close to the bottom of page hahaha

Collapse
 
fultonbrowne profile image
Fulton Browne

that worked for me

Collapse
 
abhinav1217 profile image
Abhinav Kulshreshtha

But you won't be able to press the Button 😁.

Collapse
 
amruthpillai profile image
Amruth Pillai • Edited on

Brilliant use of CSS and logic. Had so much fun playing around with this.
And using the Chrome Dev Console, clicked the button using Javascript, this was the result.
Cool that the dev included that as well :)

Nice One!

Collapse
 
salvan13 profile image
Antonio Salvati 🦊

or focus it pressing tab :)

Collapse
 
darksmile92 profile image
Robin Kretzschmar

That... was awesome! It really made me laugh loud in the office πŸ‘πŸ€£
Thanks for sharing this!

Collapse
 
simonholdorf profile image
Simon Holdorf

You're welcome πŸ˜„

 
hndcrftd profile image
Jakob Wildrain • Edited on

Yes, it is! Click on the text above the button (to gain focus) and use TAB to select the button, now press SPACE or ENTER. You have pressed the button and it changes the caption to "Nice one".
While it is technically not "clickable", it is indeed "pressable", to use your own word ;)

Collapse
 
rcoundon profile image
Ross Coundon

Love it, very clever :-D

Collapse
 
corbee profile image
Illia Pyshniak

If you press the button and then give your cursor to bottom buddy...

Collapse
 
kdraypole profile image
Kobe Raypole

This made me laugh, yet oddly frustrated at the same time.

Collapse
 
siddrc profile image
Siddharth Roychoudhury

sweet :)

Collapse
 
xeusteerapat profile image
Teerapat Prommarak

Awesome!

Collapse
 
giogiordano93 profile image
Giovanni Giordano

Passing by the bottom-left corner you can go on the button :D

Collapse
 
bl4met profile image
JD Taft

The most fun I had with this was keeping the pointer just out of reach. This probably says more about me than I'd rather admit. 🀣

Collapse
 
awwsmm profile image
Andrew (he/him)

That's awesome!

Collapse
 
simonholdorf profile image
Simon Holdorf

It is, right?

Collapse
 
ehsan profile image
Ehsan Azizi

That was fantastic!

Collapse
 
ekimlim122104 profile image
Mike Lim

hoho that's awesome dudeeeeee

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

An Animated Guide to Node.js Event Lop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.