DEV Community

Daksh Saini
Daksh Saini

Posted on

Useless

April Fools Challenge Submission ☕️🤡

What I Built
I built a completely useless and annoying button .
Whenever you try to click it, the button runs away from your cursor!
This project is intentionally designed to solve absolutely no problem. Instead, it creates a fun and frustrating experience for the user. The goal was to make something silly that makes people laugh and think, “Why would anyone build this?”
Demo
Try clicking the button… if you can
Code
Here is the full code for the project:
HTML
How I Built It
HTML for the basic structure
CSS for styling and positioning
JavaScript to make the button run away randomly
Whenever the user moves their cursor over the button, JavaScript instantly changes its position to a random location on the screen. This makes it nearly impossible to click.
Prize Category
Community Favorite 🏆
Because this project is simple, funny, and guaranteed to confuse and entertain users. It perfectly fits the spirit of April Fools by being completely useless yet oddly fun.
🔥 Tags:

devchallenge #html #css #javascript #fun #webdev

My Code

<!DOCTYPE html>

Useless Button body { height: 100vh; display: flex; justify-content: center; align-items: center; background: #111; overflow: hidden; } button { position: absolute; padding: 15px 30px; font-size: 18px; border: none; background: red; color: white; cursor: pointer; transition: 0.2s; } button:hover { background: yellow; color: black; }

Click Me

function moveBtn(btn) {
btn.style.top = Math.random() * window.innerHeight + "px";
btn.style.left = Math.random() * window.innerWidth + "px";
}

Top comments (2)

Collapse
 
narender_saini_2b2a5e117c profile image
Daksh Saini

Click it if you can.......!!!!

Collapse
 
daksh_saini_8472bf7168441 profile image
DAKSH SAINI

Sooooo Gooooood