CSS 实现叉号
2021-04-04 09:24
标签:20px height red close osi content idt after absolute CSS 实现叉号 标签:20px height red close osi content idt after absolute 原文地址:https://www.cnblogs.com/xiaoyucoding/p/12527056.html.close {
position: relative;
width: 40px;
height: 40px;
}
.close::before,
.close::after {
position: absolute;
content: ' ';
background-color: red;
left: 20px;
width: 1px;
height: 40px;
}
.close::before {
transform: rotate(45deg);
}
.close::after {
transform: rotate(-45deg);
}