到此我们效果全部完成了,以下去全部源码↓
Document
* {
margin: 0;
padding: 0;
}
body {
background-color: #000;
}
.wrap {
position: relative;
width: 230px;
height: 250px;
border: 1px solid red;
margin: 50px auto;
}
.wrap label {
position: absolute;
left: 0px;
top: 10px;
width: 70px;
height: 70px;
background-color: #f44336;
text-align: center;
border-radius: 35px;
/* font-size:0; */
line-height: 1;
}
.wrap label i {
display: inline-block;
width: 40px;
height: 6px;
background-color: #fff;
border-radius: 4px;
}
.wrap input {
display: none;
}
.wrap .blob {
position: absolute;
left: 10px;
top: 10px;
width: 50px;
height: 50px;
border-width: 0;
background-color: #f44336;
outline: none;
font-size: 30px;
border-radius: 25px;
transition: 0.5s;
}
.wrap input:checked ~ .blob {
background-color: #fff;
color: #888;
}
.wrap input:checked ~ .blob:nth-of-type(1) {
left: 100px;
top: 35px;
}
.wrap input:checked ~ .blob:nth-of-type(2) {
left: 65px;
top: 85px;
}
.wrap input:checked ~ .blob:nth-of-type(3) {
left: 15px;
top: 120px;
}
.wrap input:checked ~ .blob:nth-of-type(4) {
left: 180px;
top: 45px;
}
.wrap input:checked ~ .blob:nth-of-type(5) {
left: 160px;
top: 100px;
}
.wrap input:checked ~ .blob:nth-of-type(6) {
left: 120px;
top: 145px;
}
.wrap input:checked ~ .blob:nth-of-type(7) {
left: 70px;
top: 180px;
}
.wrap input:checked ~ .blob:nth-of-type(8) {
left: 15px;
top: 200px;
}
★
✉
⚙
✆
✎
♫
✌
❤
END