<div class="container">
<button class="button" type="button">
マウスホバーしても<br>transitionが効かない
</button>
</div>
.container {
width: 100%;
height: 300px;
display: flex;
justify-content: center;
align-items: center;
}
.button {
background-image: linear-gradient(to left, #7f7fd5, #86a8e7, #91eae4);
border: none;
cursor: pointer;
appearance: none;
position: relative;
color: #fff;
font-size: 24px;
padding: 16px 24px;
border-radius: 30px;
font-weight: bold;
transition: 0.5s;
}
.button:hover {
background-image: linear-gradient(to right, #4169e1, #87ceeb);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.