<div class="container">
<a href="#" class="button-wrap">
<div class="button">ボタン</div>
</a>
</div>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
a {
text-decoration: none;
color: #000;
}
.container {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.button-wrap {
width: 200px;
height: 200px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
overflow: hidden;
transition: transform .3s cubic-bezier(.24,.45,.32,1);
will-change: transform;
position: relative;
background-color: red;
}
.button-wrap:hover .button {
background-color: white;
color: #333;
}
.button {
width: 100px;
height: 100px;
display: flex;
justify-content: center;
align-items: center;
background-color: #333;
border: 1px solid #333;
border-radius: 50%;
font-size: 16px;
line-height: 1;
color: white;
transition: all .3s cubic-bezier(.24,.45,.32,1);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.