.link{ color: #00BFFF; font-family: 'Asap', sans-serif; font-size: 23px; font-weight: 400; text-transform: capitalize; line-height: 20px; display: inline-block; transition: all 0.5s ease 0s; } .link:focus, .link:hover{ color: #0b5693; animation: shake 100ms linear; animation-iteration-count: 5; transition: color 0.3s ease 0.4s; } @keyframes shake{ from{ text-shadow: 2px 2px rgba(0,0,0,0.5); transform: rotate(5deg); } to{ transform: rotate(0); } } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }