关闭
.app {
position: relative;
width: 500px;
height: 500px;
background: red;
}
.close {
width: 20px;
height: 20px;
/*方便相对于父元素进行定位*/
position: absolute;
top: 10px;
right: 10px;
border: 1px solid greenyellow;
border-radius: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.close::before,
.close::after{
content: "";
height: 16px;
width: 1.5px;
background: lightgreen;
}
.close::before{
transform: rotate(45deg); /*进行旋转*/
}
.close::after{
transform: rotate(-45deg);
}
We're sorry but photo-live doesn't work properly without JavaScript enabled. Please enable it to
continue.