Sleek 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>Sleek Contact Us</title> <style> body { font-family: 'Arial', sans-serif; background: linear-gradient(to right, #6a11cb, #2575fc); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-attachment: fixed; } .contact-section { background: #fff; border-radius: 10px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); 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: #333; 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 #ddd; transition: all 0.3s; font-size: 16px; } .input-group input:focus, .input-group textarea:focus { border-color: #6a11cb; box-shadow: 0 0 5px rgba(106, 17, 203, 0.5); outline: none; } .input-group textarea { resize: none; height: 120px; } .contact-btn { width: 100%; padding: 15px; background: #2575fc; border: none; color: #fff; border-radius: 5px; font-size: 18px; cursor: pointer; transition: background 0.3s; } .contact-btn:hover { background: #2054b8; } </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>