Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
}
body{padding:30px;}
.switch {
	padding:2px;
	width:60px;
	height:20px;
	background-color:#ccc;
	cursor:pointer;
	transition:0.4s;
	border-radius:40px;
}
.btn {
	width:20px;
	height:20px;
	background-color:white;
	transition:0.4s;
	margin-left:0px;
	border-radius:100%;
}
.right {
	float:right;
}
.bgchage {
	background-color:#03a9f4;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:2.1.4
 立即下载

好看的开关按钮

0