<a class="btn" href="#">
gridボタン内の前後にCSSのアイコン
</a>
.btn {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
text-align: center;
max-width: 400px;
margin-inline: auto;
padding: 10px;
border-radius: 10px;
background: #EFEFEF;
text-decoration: none;
color: inherit;
}
.btn::before,
.btn::after {
content: "";
width: 7px;
height: 7px;
border-right: 2px solid #000;
border-bottom: 2px solid #000;
}
.btn::before {
transform: rotate(135deg);
}
.btn::after {
transform: rotate(-45deg);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.