console
<button class="cart noselect"><span>Add to Cart</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19.029 13h2.971l-.266 1h-2.992l.287-1zm.863-3h2.812l.296-1h-2.821l-.287 1zm-.576 2h4.387l.297-1h-4.396l-.288 1zm2.684-9l-.743 2h-1.929l-3.474 12h-11.239l-4.615-11h14.812l-.564 2h-11.24l2.938 7h8.428l3.432-12h4.194zm-14.5 15c-.828 0-1.5.672-1.5 1.5 0 .829.672 1.5 1.5 1.5s1.5-.671 1.5-1.5c0-.828-.672-1.5-1.5-1.5zm5.9-7-.9 7c-.828 0-1.5.671-1.5 1.5s.672 1.5 1.5 1.5 1.5-.671 1.5-1.5c0-.828-.672-1.5-1.5-1.5z"/></svg></button>
<button class="wishlist noselect"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="-1 -1 26 26"><path d="M12 4.248c-3.148-5.402-12-3.825-12 2.944 0 4.661 5.571 9.427 12 15.808 6.43-6.381 12-11.147 12-15.808 0-6.792-8.875-8.306-12-2.944z"/></svg><span>Add to Wishlist</span></button>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #ffffff;
background-image: linear-gradient(315deg, #ffffff 0%, #d7e1ec 74%);
}
.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
button {
width: 150px;
height: 50px;
cursor: pointer;
margin: 5px;
background: none;
border: none;
display: flex;
align-items: center;
justify-content: center;
}
.cart {
background-color: #63a4ff;
background-image: linear-gradient(315deg, #63a4ff 0%, #83eaf1 74%);
border-radius: 10px;
color: white;
}
.cart svg {
position: absolute;
margin-left: 90px;
fill: transparent;
transition: 500ms;
}
.cart span {
transition: 500ms;
}
.cart:hover span{
margin-right: 30px;
}
.cart:hover svg {
margin-left: 40px;
fill: white;
}
.wishlist {
height: 30px;
}
.wishlist svg {
width: 15px;
height: 15px;
margin-right: 5px;
fill: transparent;
stroke: black;
stroke-width: 2px;
}
.wishlist:hover svg{
fill: red;
stroke: transparent;
}
button:focus {
outline: none;
}