<section>
<div class="btn btn__18">
<a href="#">1-18.隅から円が広がる</a>
</div>
</section>
section{
display: flex;
margin:2rem;
justify-content: center;
align-items: center;
}
.btn a {
display: inline-block;
text-decoration: none;
border: 2px solid #333;
color: #333;
padding: .7rem 1.5rem;
transition: .2s;
}
.btn.btn__18 a {
overflow: hidden;
position: relative;
transition: .3s;
}
.btn.btn__18 a:before, .btn.btn__18 a:after {
content: '';
position: absolute;
margin: auto;
width: 100px;
height: 100px;
background-color: #2382e5;
border-radius: 50%;
z-index: -1;
transition: .3s;
display: block;
}
.btn.btn__18 a:before {
top: 0;
left: 0;
transform: scale(0) translate(-50%, -50%);
transform-origin: top left;
}
.btn.btn__18 a:after {
right: 0;
bottom: 0;
transform: scale(0) translate(50%, 50%);
transform-origin: bottom right;
}
.btn.btn__18 a:hover {
color: white;
}
.btn.btn__18 a:hover:after, .btn.btn__18 a:hover:before {
transition: .6s;
}
.btn.btn__18 a:hover:after {
transform: scale(10) translate(50%, 50%);
}
.btn.btn__18 a:hover:before {
transform: scale(10) translate(-50%, -50%);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.