css x button

Solutions on MaxInterview for css x button by the best coders in the world

showing results for - "css x button"
Clara
21 Apr 2020
1.close {
2  position: absolute;
3  right: 32px;
4  top: 32px;
5  width: 32px;
6  height: 32px;
7  opacity: 0.3;
8}
9.close:hover {
10  opacity: 1;
11}
12.close:before, .close:after {
13  position: absolute;
14  left: 15px;
15  content: ' ';
16  height: 33px;
17  width: 2px;
18  background-color: #333;
19}
20.close:before {
21  transform: rotate(45deg);
22}
23.close:after {
24  transform: rotate(-45deg);
25}