Dark Mode Contact Us - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Dark Mode Contact Us</title> <style> body { font-family: 'Arial', sans-serif; background: #121212; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .contact-section { background: #1e1e1e; border-radius: 10px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); padding: 40px; width: 400px; animation: fadeIn 0.8s ease-in-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } .contact-section h2 { text-align: center; color: #fff; margin-bottom: 20px; font-size: 24px; } .input-group { position: relative; margin-bottom: 20px; } .input-group input, .input-group textarea { width: 92%; padding: 15px; border-radius: 5px; border: 1px solid #333; background: #2a2a2a; color: #fff; transition: all 0.3s; font-size: 16px; } .input-group input:focus, .input-group textarea:focus { border-color: #5a5a5a; box-shadow: 0 0 5px rgba(90, 90, 90, 0.5); outline: none; } .input-group textarea { resize: none; height: 120px; } .contact-btn { width: 100%; padding: 15px; background: #3b3b3b; border: none; color: #fff; border-radius: 5px; font-size: 18px; cursor: pointer; transition: background 0.3s; } .contact-btn:hover { background: #555; } </style> </head> <body> <div class="contact-section"> <h2>Contact Us</h2> <div class="input-group"> <input type="text" id="name" placeholder="Your Name"> </div> <div class="input-group"> <input type="email" id="email" placeholder="Your Email"> </div> <div class="input-group"> <textarea id="message" placeholder="Your Message"></textarea> </div> <button class="contact-btn" onclick="submitForm()">Send Message</button> </div> <script> function submitForm() { const name = document.getElementById('name').value; const email = document.getElementById('email').value; const message = document.getElementById('message').value; if (name && email && message) { alert('Thank you for contacting us! We will get back to you soon.'); } else { alert('Please fill in all fields.'); } } </script> </body> </html>