.link{ color: #fa8231; font-family: 'Muli', sans-serif; font-size: 22px; font-weight: 700; line-height: 22px; text-transform: capitalize; display: inline-block; overflow: hidden; position: relative; transition: all 0.3s ease 0.3s; } .link:hover, .link:focus{ color: #fa8231; } .link:before{ content:attr(data-hover); color:#555; border-bottom: 3px dashed #fa8231; position: absolute; top: -120%; left: 0; transition: all 0.35s ease; } .link:hover:before{ top: -2px; } .link span{ display: block; transition: all 0.35s ease; } .link:hover span{ transform: translateY(100%); } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }