css
.box {
width:
20px;
height:
20px;
border:
1px
solid
#
ddd;
line-height:
20px;
text-align:
center;
}
/*加号*/
.plus-icon {
display:
inline-block;
background:
red;
height:
12px;
position:
relative;
width:
2px;
}
.plus-icon:after {
background:
red;
content:
"";
height:
12px;
left:
0;
position:
absolute;
top:
0;
width:
2px;
transform:
rotateZ(
90deg)
}
/*减号*/
.minus-icon {
display:
inline-block;
background:
red;
height:
12px;
position:
relative;
width:
2px;
transform:
rotateZ(
90deg);
text-align:
center;
line-height:
20px;
}