a{ box-shadow: inset 0 0 0 0 #54b3d6; color: #308E89; padding: 0 .25rem; margin: 0 -.25rem; transition: color .3s ease-in-out, box-shadow .3s ease-in-out; } a:hover{ color: #fff; box-shadow: inset 200px 0 0 0 #54b3d6; } .card { border: 2px solid #308E89; border-radius:15px; padding:5px; margin:10px; transition: transform .2s; } .card:hover { transform: scale(0.99); /* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */ }