.link{ color: #000; font-family: 'Playfair Display', serif; font-size: 25px; font-weight: 500; line-height: 20px; text-transform: capitalize; letter-spacing: 1px; display: inline-block; position: relative; z-index: 1; transition: all 0.5s ease 0s; } .link:focus, .link:hover{ color: #9e0c21; } .link:before{ content: ''; background: #9e0c21; transform: scale(0); transform-origin: top right; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; transition: transform 0.3s, opacity 0.7s; clip-path: polygon(0 0, 0% 100%, 100% 100%); } .link:hover:before{ opacity: 0; transform: scale(1); } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }