This project is a playful and lighthearted mini web experience asking the classic question: "Do you love me?" But there's a twist — the "No" button escapes the cursor, making it nearly impossible to click, while the "Yes" button sits still, waiting for your answer.
Built using HTML, CSS, and JavaScript, this is perfect for Valentine’s Day pages, romantic proposals, or just for fun!
HTML5 – For button layout and question text
CSS3 – Styling, positioning, and transitions
JavaScript – Detects hover over the "No" button and repositions it randomly
Classic "Do you love me?" question
Two buttons: Yes and No
No button dodges the mouse on hover
Yes button triggers a cute message or animation
Responsive and lightweight for mobile and desktop
Funny and unexpected UX — perfect for pranks or cute greetings
The page displays a question with two buttons: Yes and No.
When the user tries to hover over the No button, JavaScript triggers a function that randomly moves it elsewhere on the screen:
The Yes button remains in place. When clicked, it displays a sweet message like:
“I knew it! 😍”
Or triggers a heart animation, confetti, or modal.
DOM event listeners (e.g., mouseover
, click
)
Dynamically changing style.left
and style.top
for movement
Responsive positioning and layout control
Fun UX patterns and engagement design
Add confetti or heart emojis when "Yes" is clicked
Personalize the question and final message
Use sound effects for button interaction
Add a retry loop or auto-play animation
Last Update | 23 Jul, 2025 |
Created | 10 Jul, 2025 |
Technology Used | HTML CSS JavaScript |
Compatible With | Any Browser |
Documentation | No |
Layout | Responsive |
Total Download | 13 |
Total Views | 51 |
Tags | Do You Love Me Button Funny Yes No Button Html Css Js No Button Hover Move Avoid Click Prank Javascript Button Dodge Romantic Button Game Codetap Fun Interaction Love Button Html Project |