.demo{ background: #212121; } .btn{ color: #adff2f; background: #1e1e1e; font-family: "Lobster", sans-serif; font-size: 22px; font-weight: 700; text-transform: capitalize; letter-spacing: 1.5px; margin: 0 10px; padding: 8px 15px; border: 0; border-radius: 10px; box-shadow: 0 0 10px #363636, inset 0 0 10px #363636; position: relative; z-index: 1; transition: 0.5s; } .btn:hover{ color: #adff2f; animation: animate 0.5s 1 linear; } @keyframes animate { 0% { transform: scale(0.7, 1.3); } 25% { transform: scale(1.3, 0.7); } 50% { transform: scale(0.7, 1.3); } 75% { transform: scale(1.3, 0.7); } 100% { transform: scale(1, 1); } } @media only screen and (max-width: 767px){ .btn{ margin-bottom: 30px; } }