.link{ color: #111; font-family: 'Zilla Slab', serif; font-size: 25px; font-weight: 600; letter-spacing: 1px; text-transform: lowercase; padding: 0 2px; display: inline-block; position: relative; z-index: 1; transition: all 0.3s ease 0s; } .link:before, .link:after{ content: ''; background-color: #01bfa5; width: 100%; height: 2px; position: absolute; left: 0; bottom: 0; z-index: -1; transition: all 0.3s ease-in-out; } .link:after{ background-color: transparent; height: 10px; width: 10px; border-radius: 50%; border: 1px dashed #01bfa5; visibility: hidden; transform: translateX(-50%) translateY(50%) rotate(0) scale(0); left: 50%; bottom: 50%; z-index: -2; transition: all 0.5s ease-in-out; } .link:focus:before, .link:hover:before{ height: 100%; } .link:focus:after, .link:hover:after{ transform: translateX(-50%) translateY(50%) rotate(360deg) scale(5); animation: animate 0.5s linear; } .link span{ line-height: 25px; display: block; } .link:focus, .link:hover{ color: #fff; } @keyframes animate{ 0%{ visibility: hidden; } 50%{ visibility: visible; } 100%{ visibility: hidden; } } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }