.link{ color: #777; font-family: 'Kalam', cursive; font-size: 24px; font-weight: 500; line-height: 24px; text-transform: capitalize; text-shadow: 3px 3px #ddd; display: inline-block; position: relative; z-index: 1; transition: all 0.5s ease 0s; } .link:focus, .link:hover{ color: #fff; text-shadow: none; } .link:before{ content: attr(data-hover); color: #f9412b; width: 100%; height: 0; overflow: hidden; position: absolute; top: 0; left: 0; transition: all 0.5s ease 0s; } .link:hover:before{ height: 100%; } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }