图片
 
 
<!DOCTYPE html>
<html>
 
    <head>
        <meta charset="utf-8">
        <title>Checkbox</title>
        <style type="text/css" media="screen">
            body {
                color#444;
                font-size1.6em;
                background#ccc;
            }
            
            .container {
                width90%;
                margin20px 3%;
                padding25px;
                min-height400px;
                heightauto;
                background#FFF;
            }
            
            section {
                floatleft;
                width30%;
                margin20px 20px;
            }
            
            hr {
                clearboth;
            }
            
            input[type=checkbox{
                visibilityhidden;
            }
            
            .checkboxOne {
                width40px;
                height10px;
                background#555;
                margin20px 80px;
                positionrelative;
                border-radius3px;
            }
            
            .checkboxOne label {
                displayblock;
                width16px;
                height16px;
                border-radius50%;
                -webkit-transition: all .5s ease;
                -moz-transition: all .5s ease;
                -o-transition: all .5s ease;
                -ms-transition: all .5s ease;
                transitionall .5s ease;
                cursorpointer;
                positionabsolute;
                top-3px;
                left-3px;
                background#ccc;
            }
            
            .checkboxOne input[type=checkbox]:checked+label {
                left27px;
            }
            
            .checkboxTwo {
                width120px;
                height40px;
                background#333;
                margin20px 60px;
                border-radius50px;
                positionrelative;
            }
            
            .checkboxTwo:before {
                content'';
                positionabsolute;
                top19px;
                left14px;
                height2px;
                width90px;
                background#111;
            }
            
            .checkboxTwo label {
                displayblock;
                width22px;
                height22px;
                border-radius50%;
                -webkit-transition: all .5s ease;
                -moz-transition: all .5s ease;
                -o-transition: all .5s ease;
                -ms-transition: all .5s ease;
                transitionall .5s ease;
                cursorpointer;
                positionabsolute;
                top9px;
                z-index1;
                left12px;
                background#ddd;
            }
            
            .checkboxTwo input[type=checkbox]:checked+label {
                left84px;
                background#26ca28;
            }
            
            .checkboxThree {
                width120px;
                height40px;
                background#333;
                margin20px 60px;
                border-radius50px;
                positionrelative;
            }
            
            .checkboxThree:before {
                content'On';
                positionabsolute;
                top12px;
                left13px;
                height2px;
                color#26ca28;
                font-size16px;
            }
            
            .checkboxThree:after {
                content'Off';
                positionabsolute;
                top12px;
                left84px;
                height2px;
                color#ddd;
                font-size16px;
            }
            
            .checkboxThree label {
                displayblock;
                width52px;
                height22px;
                border-radius50px;
                -webkit-transition: all .5s ease;
                -moz-transition: all .5s ease;
                -o-transition: all .5s ease;
                -ms-transition: all .5s ease;
                transitionall .5s ease;
                cursorpointer;
                positionabsolute;
                top9px;
                z-index1;
                left12px;
                background#ddd;
            }
            
            .checkboxThree input[type=checkbox]:checked+label {
                left60px;
                background#26ca28;
            }
            
            .checkboxFour {
                width40px;
                height40px;
                background#ddd;
                margin20px 90px;
                border-radius100%;
                positionrelative;
                -webkit-box-shadow: 0px 1px 3px rgba(0000.5);
                -moz-box-shadow: 0px 1px 3px rgba(0000.5);
                box-shadow0px 1px 3px rgba(0000.5);
            }
            
            .checkboxFour label {
                displayblock;
                width30px;
                height30px;
                border-radius100px;
                -webkit-transition: all .5s ease;
                -moz-transition: all .5s ease;
                -o-transition: all .5s ease;
                -ms-transition: all .5s ease;
                transitionall .5s ease;
                cursorpointer;
                positionabsolute;
                top5px;
                left5px;
                z-index1;
                background#333;
                -webkit-box-shadow: inset 0px 1px 3px rgba(0000.5);
                -moz-box-shadow: inset 0px 1px 3px rgba(0000.5);
                box-shadowinset 0px 1px 3px rgba(0000.5);
            }
            
            .checkboxFour input[type=checkbox]:checked+label {
                background#26ca28;
            }
            
            .checkboxFive {
                width25px;
                margin20px 100px;
                positionrelative;
            }
            
            .checkboxFive label {
                cursorpointer;
                positionabsolute;
                width25px;
                height25px;
                top0;
                left0;
                background#eee;
                border1px solid #ddd;
            }
            
            .checkboxFive label:after {
                opacity0.2;
                content'';
                positionabsolute;
                width9px;
                height5px;
                backgroundtransparent;
                top6px;
                left7px;
                border3px solid #333;
                border-topnone;
                border-rightnone;
                -webkit-transform: rotate(-45deg);
                -moz-transform: rotate(-45deg);
                -o-transform: rotate(-45deg);
                -ms-transform: rotate(-45deg);
                transform: rotate(-45deg);
            }
            
            .checkboxFive label:hover::after {
                opacity0.5;
            }
            
            .checkboxFive input[type=checkbox]:checked+label:after {
                opacity1;
            }
        </style>
    </head>
 
    <body>
        <section class="container">
            <section>
 
                <h3></h3>
                <div class="checkboxOne">
                    <input type="checkbox" value="1" id="checkboxOneInput" name="" />
                    <label for="checkboxOneInput"></label>
                </div>
            </section>
            <section>
 
                <h3></h3>
                <div class="checkboxTwo">
                    <input type="checkbox" value="1" id="checkboxTwoInput" name="" />
                    <label for="checkboxTwoInput"></label>
                </div>
            </section>
            <section>
 
                <h3></h3>
                <div class="checkboxThree">
                    <input type="checkbox" value="1" id="checkboxThreeInput" name="" />
                    <label for="checkboxThreeInput"></label>
                </div>
            </section>
            <section>
 
                <h3></h3>
                <div class="checkboxFour">
                    <input type="checkbox" value="1" id="checkboxFourInput" name="" />
                    <label for="checkboxFourInput"></label>
                </div>
            </section>
            <section>
 
                <h3></h3>
                <div class="checkboxFive">
                    <input type="checkbox" value="1" id="checkboxFiveInput" name="" />
                    <label for="checkboxFiveInput"></label>
                </div>
            </section>
            <div style="clear:both;"></div>
            <hr/>
            ````````````````
        </section>
    </body>
 
</html>