I've been attempting to create a hover effect on a button that transitions by 0.5s, but for some reason it's not working properly. Does anyone have any insight into what might be causing this issue?
Below is the CSS code I've used:
.btn {
display: inline-block;
background-image: linear-gradient(90deg, #e34067,#f89c4b);
padding: 1rem 2rem;
padding-left: 1.4rem;
align-items: center;
border-radius: 10px;
border: none;
cursor: pointer;
transition: all 0.5s;
}
.btn p {
padding-left: 0.5rem;
}
.btn:hover {
background-image: linear-gradient(90deg,#f89c4b, #e34067);
}
<div type="button" class="add-photo">
<a class="btn" href="#"><i class="fa fa-plus-circle"></i>
<p> Add Photo</p>
</a>
</div>