"Social Media"
Bootstrap 3.0.0 Snippet by aprilnicholem

<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/Aoyue/pen/MEPJEp?limit=all&page=52&q=css" /> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.10.3/sweetalert2.min.css'><link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css'><link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css'><link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Roboto+Mono:300,700'> <style class="cp-pen-styles">body, html { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; height: 100%; min-height: inherit; width: 100%; max-width: 100%; font-size: 1rem; letter-spacing: 0.5px; background: linear-gradient(135deg, #ff5f6d 20%, #ffc371 80%); color: #fff; text-align: center; font-family: 'Roboto Mono', monospace; } * { padding: 0px; margin: 0px; } h1 { font-size: 6em; font-weight: 700 !important; text-shadow: 1px 1px rgba(0, 0, 0, 0.02), 2px 2px rgba(0, 0, 0, 0.02), 3px 3px rgba(0, 0, 0, 0.02), 4px 4px rgba(0, 0, 0, 0.02), 0.125rem 0.125rem rgba(0, 0, 0, 0.02), 6px 6px rgba(0, 0, 0, 0.02), 7px 7px rgba(0, 0, 0, 0.02), 8px 8px rgba(0, 0, 0, 0.02), 9px 9px rgba(0, 0, 0, 0.02), 0.3125rem 0.3125rem rgba(0, 0, 0, 0.02), 11px 11px rgba(0, 0, 0, 0.02), 12px 12px rgba(0, 0, 0, 0.02), 13px 13px rgba(0, 0, 0, 0.02), 14px 14px rgba(0, 0, 0, 0.02), 0.625rem 0.625rem rgba(0, 0, 0, 0.02), 16px 16px rgba(0, 0, 0, 0.02), 17px 17px rgba(0, 0, 0, 0.02), 18px 18px rgba(0, 0, 0, 0.02), 19px 19px rgba(0, 0, 0, 0.02), 1.25rem 1.25rem rgba(0, 0, 0, 0.02); } h4, h5 { margin-top: 1em; letter-spacing: 3px; } h1, h2, h3, h4, h5, h6 { line-height: 100%; font-weight: normal; } p { font-size: 0.875em; margin-bottom: 1em; line-height: 160%; } #toggle-alert { position: fixed; z-index: 1000; right: 1.5em; top: 1.5em; display: block; border: 1px solid #fff; padding: 1em 1.8em; font-size: 0.6125em; border-radius: 100em; cursor: pointer; -webkit-transition: .3s ease-out all; transition: .3s ease-out all; } #toggle-alert i { margin-right: 0.7em; line-height: 100%; opacity: .7; font-size: 1rem; } #toggle-alert:hover { border-color: #ffc371; color: #ffc371; } .options { display: table; border-collapse: collapse; width: 100%; height: inherit; table-layout: fixed; } .options > .option { position: relative; overflow: hidden; display: table-cell; vertical-align: middle; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); -webkit-transition-property: background; transition-property: background; -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1); transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1); -webkit-transition-duration: .3s; transition-duration: .3s; border: 1px solid rgba(255, 255, 255, 0.07); } .options > .option > input[type="radio"], .options > .option > input[type="checkbox"] { position: absolute; display: none; top: 0; left: 0; width: 100%; height: 100%; } .options > .option > input[type="radio"]:hover, .options > .option > input[type="radio"]:checked, .options > .option > input[type="checkbox"]:hover, .options > .option > input[type="checkbox"]:checked { cursor: pointer !important; } .options > .option > input[type="radio"]:hover ~ .option-content, .options > .option > input[type="radio"]:checked ~ .option-content, .options > .option > input[type="checkbox"]:hover ~ .option-content, .options > .option > input[type="checkbox"]:checked ~ .option-content { width: 100%; -webkit-transform: scale(1.3, 1.3); transform: scale(1.3, 1.3); } .options > .option > input[type="radio"]:checked ~ .on-checked, .options > .option > input[type="checkbox"]:checked ~ .on-checked { opacity: 1; -webkit-box-shadow: inset 0px 0px 3em -1.2em rgba(0, 0, 0, 0.5); box-shadow: inset 0px 0px 3em -1.2em rgba(0, 0, 0, 0.5); } .options > .option > input[type="radio"]:active ~ .option-content, .options > .option > input[type="checkbox"]:active ~ .option-content { -webkit-transform: scale(1.15, 1.15); transform: scale(1.15, 1.15); } .options > .option > .option-content { position: relative; z-index: 1; cursor: pointer !important; height: inherit; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); -webkit-transition-property: background, padding, -webkit-transform, -webkit-transform; transition-property: background, padding, -webkit-transform, -webkit-transform; transition-property: transform, background, padding, transform; transition-property: transform, background, padding, transform, -webkit-transform, -webkit-transform; -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1); transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1); -webkit-transition-duration: .3s; transition-duration: .3s; } .options > .option > .on-checked { position: absolute; z-index: 0; left: 0; top: 0; height: 100%; width: 100%; opacity: 0; pointer-events: none; -webkit-transition-property: opacity; transition-property: opacity; -webkit-transition-duration: .5s; transition-duration: .5s; background-color: rgba(0, 0, 0, 0.1); } </style></head><body> <div class="options"> <label class="option"> <input type="radio" name="company" value="apple" checked> <div class="option-content"> <h1 class="animated bounceIn"><i class="ion-social-apple-outline"></i></h1> <h4>APPLE</h4> <h4><i class="ion-android-radio-button-on"></i></h4> </div> <div class="on-checked"></div> </label> <label class="option"> <input type="radio" name="company" value="facebook"> <div class="option-content"> <h1 class="animated bounceIn"><i class="ion-social-facebook-outline"></i></h1> <h4>FACEBOOK</h4> <h4><i class="ion-android-radio-button-on"></i></h4> </div> <div class="on-checked"></div> </label> <label class="option"> <input type="checkbox" name="social" value="tumblr" checked> <div class="option-content"> <h1 class="animated bounceIn"><i class="ion-social-tumblr-outline"></i></h1> <h4>TUMBLR</h4> <h4><i class="ion-android-checkbox-outline"></i></h4> </div> <div class="on-checked"></div> </label> <label class="option"> <input type="checkbox" name="social" value="twitter"> <div class="option-content"> <h1 class="animated bounceIn"><i class="ion-social-twitter-outline"></i></h1> <h4>TWITTER</h4> <h4><i class="ion-android-checkbox-outline"></i></h4> </div> <div class="on-checked"></div> </label> </div> <a id="toggle-alert"><i class="ion-ios-chatboxes"></i><span>OFF Alert</span></a> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.10.3/sweetalert2.min.js'></script> <script >// CSS only !! // The following JS is a easy way to get checked value with jQuery var showAlert = true; // for radio $('input[type="radio"]').on('change', (event) => { const name = event.target.name; const value = event.target.value; if(!showAlert) return; // print swal({ title: name, type: 'success', html: 'value: <strong>' + value + '</strong>', confirmButtonText: 'okay' }) }); // for checkbox $('input[type="checkbox"]').on('change', (event) => { const name = event.target.name; const values = []; $('input[name="' + name + '"]:checked').each((index, input) => { values.push($(input).val()); }); if(!showAlert) return; // print if(values.length) { swal({ title: event.target.name, type: 'success', html: 'value: <strong>' + JSON.stringify(values) + '</strong>', confirmButtonText: 'okay' }) } else { swal({ title: event.target.name, type: 'warning', html: 'Please choose a social', confirmButtonText: 'okay' }) } }); // enable / disabled alert $('#toggle-alert').on('click', ()=> { if(showAlert) { $('#toggle-alert span').text('ON alert'); } else { $('#toggle-alert span').text('OFF alert'); } showAlert = showAlert ? false : true; }) //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: