<button type="button" class="btn normal ">送信</button>
body {
padding: 50px;
}
.btn {
border: none;
padding: 15px 20px 17px;
appearance: none;
font-size: 16px;
line-height: 1.5;
color: #fff;
font-weight: bold;
position: relative;
box-sizing: border-box;
background: none;
cursor: pointer;
&::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 5px;
background-color: #294d77;
transition: all cubic-bezier(0.16, 0.77, 0.36, 1) 200ms;
z-index: -1;
box-shadow: 0 0 0 0 rgba(#294d77, 0.2);
}
&:hover,
&:active,
&:focus {
outline: none;
}
&.normal {
&:hover {
&::after {
filter: brightness(1.7);
}
}
&:active {
&::after {
filter: brightness(2);
}
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.