<section>
<div class="btn btn__07">
<a href="#">1-7.下から幕が上がる</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__07 a {
overflow: hidden;
position: relative;
transition: .3s;
}
.btn.btn__07 a:before {
content: '';
position: absolute;
bottom: 0;
left: 0;
margin: auto;
width: 100%;
height: 0;
background-color: #2382e5;
z-index: -1;
transition: .3s;
}
.btn.btn__07 a:hover {
transition: .3s;
color: white;
}
.btn.btn__07 a:hover:before {
height: 100%;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.