Html
    Css
    Js

    
                        
.btn_swtich_box {
	position:relative;
	width:100px;
	background-size:100% 100%;
	margin-top:30px;
	border-radius:50px;
}
.btn_swtich_1bg {
	background-color:#ed4646;
}
.btn_swtich_2bg {
	background-color:#f4f4f4;
}
.btn_swtich_3bg {
	background-color:#4dd865;
}
.btn_swtich_anim {
	position:absolute;
	top:0px;
	background-color:#fff;
	box-shadow:0px 0px 4px 0px #999;
}
.btnHide_swtich {
	float:left;
	background-color:transparent;
	opacity:0;
}

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

jQuery按钮开关效果三种滚动变化

0