"toggle css"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html lang='en' class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/lonekorean/pen/RPZZPe?limit=all&page=81&q=css" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <style class="cp-pen-styles">@import url(https://fonts.googleapis.com/css?family=Noto+Sans); *, *::before, *::after { -webkit-box-sizing: border-box; box-sizing: border-box; } html { min-height: 100%; } body { color: #435757; background: radial-gradient(#fff, #dac4cd); font: 1.4em/1 'Noto Sans', sans-serif; } .container { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } input { position: absolute; left: -9999px; } label { display: block; position: relative; margin: 20px; padding: 15px 30px 15px 62px; border: 3px solid #fff; border-radius: 100px; color: #fff; background-color: #6a8494; -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, .2); box-shadow: 0 0 20px rgba(0, 0, 0, .2); white-space: nowrap; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-transition: background-color .2s, -webkit-box-shadow .2s; transition: background-color .2s, -webkit-box-shadow .2s; transition: background-color .2s, box-shadow .2s; transition: background-color .2s, box-shadow .2s, -webkit-box-shadow .2s; } label::before { content: ''; display: block; position: absolute; top: 10px; bottom: 10px; left: 10px; width: 32px; border: 3px solid #fff; border-radius: 100px; -webkit-transition: background-color .2s; transition: background-color .2s; } label:first-of-type { -webkit-transform: translateX(-40px); transform: translateX(-40px); } label:last-of-type { -webkit-transform: translateX(40px); transform: translateX(40px); } label:hover, input:focus + label { -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, .6); box-shadow: 0 0 20px rgba(0, 0, 0, .6); } input:checked + label { background-color: #ab576c; } input:checked + label::before { background-color: #fff; }</style></head><body> <!-- Checkbox Trickery with CSS: http://codersblock.com/blog/checkbox-trickery-with-css/ --> <div class="container"> <input id="toggle1" type="checkbox" checked> <label for="toggle1">Toggle me!</label> <input id="toggle2" type="checkbox"> <label for="toggle2">Hey, me too!</label> <input id="toggle3" type="checkbox"> <label for="toggle3">Toggle party!</label> </div> </body></html>

Related: See More


Questions / Comments: