❤️ Overview
This project is a cute interactive Valentine Letter animation where the user first sees a pulsing envelope. Clicking it opens a letter window with an adorable cat GIF and a playful Yes / No interaction.
The No button avoids the cursor, while clicking Yes reveals a final Valentine message with animations. This type of UI is perfect for:
- Valentine reels & shorts
- Fun JavaScript projects
- Beginner-friendly animation demos
- Personal surprise websites
📦 Technologies Used
- HTML5 – Structure and layout
- CSS3 – Animations, transitions, layout styling
- JavaScript – Interaction logic and state handling
- Google Fonts – Pixel-style typography
🧩 Complete Code
HTML
CSS
JavaScript
🧠 How It Works
Envelope Interaction
- A pulsing animation attracts the user
- Clicking the envelope reveals the letter with a scale-in animation
No Button Logic
- The No button moves randomly on hover
- Uses trigonometry for natural movement
Yes Button Result
- Updates heading text
- Changes the GIF
- Hides buttons
- Reveals final Valentine message
✨ Features
- Smooth CSS animations
- Fun and playful interaction
- Beginner-friendly JavaScript logic
- Fully responsive layout
- Perfect for Valentine surprise pages
🚀 Possible Enhancements
- Add background music toggle 🎵
- Confetti animation on YES 🎉
- Mobile vibration support
- Save YES state using localStorage
