Hi,
I’m trying to make the border for my buttons be just the corners. I’ve managed to get the upper left and right corners to appear, but I can’t get the bottom left and right corners to work. Any help is appreciated. See image & CSS below:
CURRENT CSS:
.x-btn {
margin: 20;
background: none;
border: none;
padding: 10px;
box-sizing: content-box;
border: 1px solid transparent;
}
.x-btn::before, .x-btn::after, span::before, span::after {
display: block;
content: “”;
width: 20px;
height: 20px;
position: absolute;
}
.x-btn::before {
top: -1px;
left: -1px;
border-top: 1px solid black;
border-left: 1px solid black;
transition: 0.5s all;
}
.x-btn::after {
top: -1px;
right: -1px;
border-top: 1px solid black;
border-right: 1px solid black;
transition: 0.5s all;
}
.x-btn span::before {
bottom: -1px;
left: -1px;
border-bottom: 1px solid black;
border-left: 1px solid black;
transition: 0.5s all;
}
.x-btn span::after {
bottom: -1px;
right: -1px;
border-bottom: 1px solid black;
border-right: 1px solid black;
transition: 0.5s all;
}
.x-btn:hover::before, .x-btn:hover::after {
width: 100%;
height: 100%;
}
.x-btn:hover span::before, .x-btn:hover span::after {
width: 100%;
height: 100%;
}
.x-btn: hover {
border: 1px solid black;