Modern Minimal 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>Modern Minimal 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: #f0f2f5; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .rating-form { background: #fff; border-radius: 12px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); padding: 2rem; max-width: 400px; width: 100%; text-align: center; color: #333; } .rating-form h1 { font-size: 1.8rem; margin-bottom: 1rem; } .rating-form p { margin-bottom: 1.5rem; color: #777; } .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: #ddd; 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: #ff6f61; } .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 #ddd; border-radius: 8px; transition: border-color 0.3s ease; } .rating-form .feedback input:focus, .rating-form .feedback textarea:focus { border-color: #ff6f61; } .rating-form .submit-btn { background: #ff6f61; 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: #ff4a3c; } </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>