好脑子不如烂笔头

看完之后及时的巩固和做好笔记,以后温习很方便
input做一个开关按钮

.mui-switch {
width: 52px;
height: 31px;
position: relative;
border: 1px solid #dfdfdf;
background-color: #fdfdfd;
box-shadow: #dfdfdf 0 0 0 0 inset;
border-radius: 20px;
display: inline-block;
-webkit-appearance: none;
outline: none; }
.mui-switch:before {
content: '';
width: 29px;
height: 29px;
position: absolute;
top: 0px;
left: 0;
border-radius: 20px;
background-color: #fff;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.mui-switch:checked {
background-color: red; }
.mui-switch:checked:before {
left: 21px; }

 

 

<label><input class="mui-switch" type="checkbox" value=""> </label>

posted on 2017-03-15 16:58  tank&?  阅读(1523)  评论(0编辑  收藏  举报