Retro Tv 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>Retro TV 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: #e1e5ea; border: 2px solid #5a5a5a; border-radius: 5px; cursor: pointer; transition: background-color 0.3s; } .checkbox-container input { opacity: 0; width: 0; height: 0; } .checkbox-slider { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; background-color: #5a5a5a; border-radius: 50%; transition: transform 0.3s; transform: translateY(0%); display: flex; justify-content: center; align-items: center; font-size: 16px; color: #e1e5ea; border: 2px solid #5a5a5a; } .checkbox-container input:checked + .checkbox-slider { transform: translateY(50%); background-color: #5a5a5a; } .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: #5a5a5a; } </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">Play video</span> </div> </body> </html>