Gradient Glow Rating Form - 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>Gradient Glow Rating Form</title> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"> <style> body { font-family: 'Roboto', sans-serif; background: #1a1a1a; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .rating-form { background: #222; border-radius: 12px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); padding: 2rem; max-width: 400px; width: 100%; text-align: center; color: white; position: relative; overflow: hidden; } .rating-form::before { content: ''; position: absolute; top: 0; left: 50%; width: 200%; height: 100%; background: linear-gradient(120deg, #f093fb, #f5576c, #f093fb, #f5576c); background-size: 200% 200%; z-index: -1; transition: all 0.4s ease; transform: translateX(-50%); } .rating-form:hover::before { transform: translateX(0); } .rating-form h1 { font-size: 1.8rem; margin-bottom: 1rem; } .rating-form p { margin-bottom: 1.5rem; color: #ccc; } .rating-form .stars { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; } .rating-form .stars input { display: none; } .rating-form .stars label { font-size: 2rem; color: #555; cursor: pointer; transition: color 0.3s ease; } .rating-form .stars input:checked ~ label, .rating-form .stars label:hover, .rating-form .stars label:hover ~ label { color: #f093fb; } .rating-form .feedback { display: none; flex-direction: column; gap: 0.5rem; } .rating-form .feedback input, .rating-form .feedback textarea { width: 96%; padding: 0.5rem; border: 1px solid #333; border-radius: 8px; background: #333; color: white; transition: border-color 0.3s ease; } .rating-form .feedback input:focus, .rating-form .feedback textarea:focus { border-color: #f093fb; } .rating-form .submit-btn { background: #f093fb; color: white; padding: 0.75rem 1.5rem; border: none; border-radius: 8px; cursor: pointer; transition: background 0.3s ease; } .rating-form .submit-btn:hover { background: #f5576c; } </style> </head> <body> <div class="rating-form"> <h1>Rate Our Service</h1> <p>We value your feedback. Please rate our service and provide your comments below.</p> <div class="stars"> <input type="radio" name="rating" id="star5" value="5"> <label for="star5" class="fa fa-star"></label> <input type="radio" name="rating" id="star4" value="4"> <label for="star4" class="fa fa-star"></label> <input type="radio" name="rating" id="star3" value="3"> <label for="star3" class="fa fa-star"></label> <input type="radio" name="rating" id="star2" value="2"> <label for="star2" class="fa fa-star"></label> <input type="radio" name="rating" id="star1" value="1"> <label for="star1" class="fa fa-star"></label> </div> <div class="feedback"> <input type="text" placeholder="Your Name"> <textarea rows="4" placeholder="Your Comments"></textarea> <button class="submit-btn">Submit</button> </div> </div> <script> document.querySelectorAll('.stars input').forEach((input) => { input.addEventListener('change', () => { document.querySelector('.feedback').style.display = 'flex'; }); }); </script> </body> </html>