.link{ color: #555; font-family: 'Poppins', cursive; font-size: 22px; font-weight: 500; line-height: 20px; text-transform: capitalize; display: inline-block; position: relative; z-index: 1; transition: all 0.5s ease 0s; } .link:focus, .link:hover{ color: #4568DC; } .link:before{ content: ''; border: 2px solid #ccc; width: 100%; height: 100%; opacity: 0; position: absolute; top: 0; left: -1px; z-index: -1; transition: opacity 0.4s ease 0s,border-radius 0.2s ease 0.2s,transform 0.3s ease 0.2s, border 0.3s ease 0.3s; } .link:hover:before{ opacity: 1; border-radius: 30px; border-right-color: transparent; border-left-color: transparent; transform: scaleX(0.78) scaleY(1.3); } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }