<div class="text-center">
<button [disabled]="btnStatus" class="btn btn-secondary buttonSend" type="submit">
<div [hidden]="btnStatus">
Send Message <i class="material-icons" style="vertical-align: -6px;">send</i>
</div>
<div [hidden]="!btnStatus" class="spinner-border spinner-border-sm text-light" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</button>
</div>
When the button is hovered over, I want to create an animation that translates the send icon on the X-axis.
I attempted to achieve this effect using the following CSS:
.buttonSend:hover .buttonIcon
{
animation: logoAnim 0.5s forwards;
}
@keyframes logoAnim
{
from
{
transform: translateX(0);
}
to
{
transform: translateX(10);
opacity: 0;
}
}