.link{ color: #fff; font-family: 'Almarai', sans-serif; font-size: 22px; line-height: 22px; text-transform: capitalize; display: inline-block; position: relative; z-index: 1; transition: all 0.3s ease 0s; } .link:focus, .link:hover{ color: #fff; } .link:before{ content: attr(data-hover); color: #B33771; background: #fff; font-size: 18px; line-height: 22px; text-transform: uppercase; text-align: center; width: 100%; height: 2px; overflow: hidden; position: absolute; top: 95%; left: 0; transition: height 0.2s ease 0s, top 0.1s ease 0.2s; } .link:hover:before{ height: 100%; box-shadow: 0 0 10px rgba(0,0,0,0.2); top: 0; transition: top 0.2s ease 0s, height 0.5s ease 0.3s, padding 0.5s ease 0.3s; } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }