Shiny Gold 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>Shiny Gold 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-color: #f3e5ab; border-radius: 15px; cursor: pointer; transition: background-color 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: #ffd700; 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-color: #ffd700; box-shadow: 0 0 10px #ffd700; } .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: #333; } </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">Subscribe to newsletter</span> </div> </body> </html>