In this section i want to explain about how to create simple activate deactivate switch using the simple css3. Here we design the buttons with the help of css3. The button design css code is below

.switch {

position: relative;

display: inline-block;

width: 75px;

height: 34px;

}

This code is used to design the button you can change here height and width of the switch / button. Inside the button we have one slider circle the following code is used to create that white circle inside the button.

.slider:before {

position: absolute;

content: "";

height: 26px;

width: 26px;

left: 4px;

bottom: 4px;

background-color: white;

-webkit-transition: .4s;

transition: .4s;

}

Normal position of the switch is in red. When you clicked it turns in to green that means active status when you clicked again it turns in red that means de-active status. that will be done below css code.

.slider {

position: absolute;

cursor: pointer;

top: 0;

left: 0;

right: 0;

bottom: 0;

background-color: red;

-webkit-transition: .4s;

transition: .4s;

}

input:checked + .slider {

background-color: green;

}

This is very useful you can use this activate and deactivate button in several web applications. It is very simple and nice and also you can create this using simple css3 code. Here is the full code available. you can download the code and use it your projects. And also provided demo page, please checkout the demo page then you can know how the buttons are working...