87,904
社区成员
发帖
与我相关
我的任务
分享
<div class="box">
<div class="one"></div>
<div class="two"></div>
</div>
.box {
width: 30px;
height: 30px;
position: relative;
}
.box>div {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.box>div:after {
content: '';
position: absolute;
left: 0;
top: 47%;
width: 100%;
height: 1px;
background: #999;
}
.box .one {
transform: rotate(-45deg);
}
.box .two {
transform: rotate(45deg);
}