cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              		<div class="controlContainer">
		<span class="switchLabel">Select Item 1</span>
		<label class="switch">
			<input type="checkbox">
			<div class="slider round"><span class="bg"></span><span class="bgLine"></span></div>
			<span class="power"></span>
		</label>
		</div>
		<div class="controlContainer">
		<span class="switchLabel">Select Item 2</span>
		<label class="switch">
			<input type="checkbox">
			<div class="slider round"><span class="bg"></span><span class="bgLine"></span></div>
			<span class="power"></span>
		</label>
		</div>
            
          
!
            
              			.controlContainer{
				padding-bottom:1em;
			}
		
			.switchLabel{
				position:relative;
				bottom:11px;
			}
		
			.switch{
				position:relative;
				display:inline-block;
				width:62px;
				height:36px;
				margin-left:1em;
			}
			
			.switch input {
				display:none;
			}
			
			.slider{
				position:absolute;
				cursor:pointer;
				top:0;
				left:0;
				right:0;
				bottom:0;
				background-color:lightgray;
				border-radius:32px;
				transition: .4s;
				border:1px solid gray;
				box-shadow:0px 5px 0px 0px gray;
			}
			
			.slider > .bg{
				position:absolute;
				content:"";
				top:4px;
				left:4px;
				right:0;
				bottom:4px;
				height:27px;
				width:52px;		
				border-radius:32px;
				background-color:#aaa;
			}
			
			.slider > .bgLine{
				margin-left:auto;
				margin-right:auto;
				position:absolute;
				content:"";
				border:2px solid gray;
				top:16px;
				right:0;
				bottom:4px;
				height:0px;
				left:0px;
				width:52%;		
				background-color:#aaa;
			}
			
			
			.slider::before{
			
				position:absolute;
				content:"";
				z-index:2000;
				height:27px;
				top:0px;
				width:27px;
				left:4px;
				border-radius:70px;
				box-shadow:0px 3px 0px 0px gray;
				transition: all .4s ease-in-out;
			}
			
			.slider::after{
				position:absolute;
				content:"";
				top:0px;

				left:4px;
				bottom:4px;
				height:25px;
				width:25px;
				background-color:#fff;
				border:1px solid gray;
				border-radius:32px;
				transition: all .4s ease-in-out;
				/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#f2f6f8+0,d8e1e7+50,b5c6d0+51,e0eff9+100;Grey+Gloss+%232 */
				background: #f2f6f8; /* Old browsers */
				background: -moz-linear-gradient(left,  #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%); /* FF3.6-15 */
				background: -webkit-linear-gradient(left,  #f2f6f8 0%,#d8e1e7 50%,#b5c6d0 51%,#e0eff9 100%); /* Chrome10-25,Safari5.1-6 */
				background: linear-gradient(to right,  #f2f6f8 0%,#d8e1e7 50%,#b5c6d0 51%,#e0eff9 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
				filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f6f8', endColorstr='#e0eff9',GradientType=1 ); /* IE6-9 */
			}
			
			input:checked + .slider::after{
				transform: translateX(26px) rotate(720deg);
				
			}
			
						input:checked + .slider::before{
				transform: translateX(26px);
				
			}
            
          
!
999px
Loading ..................

Console