.link{ color: #111; font-family: 'Yeon Sung', cursive; font-size: 25px; font-weight: 600; line-height: 22px; text-transform: uppercase; letter-spacing: 1px; text-align: center; padding: 3px 6px 4px; display: inline-block; overflow: hidden; position: relative; z-index: 1; transition: all 0.3s ease; } .link:hover{ color: #fff; text-shadow: 0 0 3px #000; } .link:before, .link:after{ content: ""; background: #e84393; width: 100%; height: 4px; position: absolute; bottom: 0; left: 0; z-index: -1; transition: all 0.3s ease; } .link:hover:before{ width: 0; height: 100%; } .link:after{ height: 100%; bottom: 100%; } .link:hover:after{ bottom: 0; } @media only screen and (max-width: 767px){ .link{ margin: 0 0 30px; } }