Gradient Shine Checkbox - 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 Shine Checkbox</title> <style> body { font-family: Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #f0f2f5; } .checkbox-container { position: relative; display: inline-block; width: 60px; height: 30px; background: linear-gradient(45deg, #ff8a00, #e52e71); border-radius: 15px; cursor: pointer; transition: background 0.3s; } .checkbox-container input { opacity: 0; width: 0; height: 0; } .checkbox-slider { position: absolute; top: 50%; left: 4px; width: 22px; height: 22px; background-color: #fff; border-radius: 50%; transition: transform 0.3s; transform: translateY(-50%); display: flex; justify-content: center; align-items: center; font-size: 16px; color: #666; } .checkbox-container input:checked + .checkbox-slider { transform: translate(26px, -50%); background: linear-gradient(45deg, #2b5876, #4e4376); color: #fff; } .checkbox-container input:checked + .checkbox-slider::before { content: "✔️"; } .checkbox-container input:not(:checked) + .checkbox-slider::before { content: "✖️"; } .checkbox-label { margin-left: 10px; font-size: 18px; color: #555; } </style> </head> <body> <div class="checkbox-wrapper"> <label class="checkbox-container"> <input type="checkbox" title="Toggle Switch"> <span class="checkbox-slider"></span> </label> <span class="checkbox-label">Accept terms and conditions</span> </div> </body> </html>