.link{ color: #555; font-family: 'Poppins', sans-serif; font-size: 25px; line-height: 23px; display: inline-block; overflow: hidden; position: relative; z-index: 1; transition: all 0.4s ease 0.1s; } .link:hover, .link:focus{ color: #fff; overflow: visible; } .link:before, .link:after{ content: ''; background: linear-gradient(to right,#B33771,#6D214F); height: 100%; width: 0; position: absolute; left: 0; top: 0; z-index: -1; transition: all 0.3s ease 0s; } .link:after{ background: #6D214F; left: auto; right: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); } .link:hover:before{ width: calc(100%); transform: scaleY(1.3); left: -5px; } .link:hover:after{ width: 15px; transform: scaleY(1.3); right: -10px; } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }