Html
    Css
    Js

    
                        
#div1 {
	width:204px;
	height:100px;
	border-radius:100px;
	position:relative;
}
#div2 {
	width:102px;
	height:100px;
	border-radius:50px;
	position:absolute;
}
.open1 {
	background:yellow;
}
.open2 {
	background:blue;
}
.open2 {
	right:1px;
	top:-2px;
}
.close1 {
	background:white;
	border:2px solid #ddd;
}
.close2 {
	left:1px;
	background:black;
	border:1px solid black;
}

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

编写开关按钮颜色自行修改

0