.btn{ color: #fff; background: #bf7b7b; font-family:'Archivo', sans-serif; font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 8px 15px; border-radius: 5px; border: none; overflow: hidden; position: relative; z-index: 1; transition: all 0.6s ease-out 0.0s; } .btn:hover, .btn:focus{ color: #fff; } .btn:before, .btn:after{ content: ""; position: absolute; left: 0; transition: all 0.35s; } .btn:before{ background: #562424; width: 0; height: 4.5px; bottom: 0; z-index: 2; } .btn:after{ content: attr(data-text); background: #8b5252; width: 100%; height: 100%; padding: 8px 15px; border-radius: 5px; transform: translate(0, -100%); top: 0; z-index: 1; } .btn:hover:before { width: 100%; } .btn:hover:after{ transform: translate(0, 0); } @media only screen and (max-width: 767px){ .btn{ margin-bottom: 30px; } }