:root{ --white: #fff; --main-color:#c44569; } .demo{ background: #e8e8e8; } .link{ color: var(--white); background: var(--main-color); font-family: "Oxygen", sans-serif; font-size: 22px; font-weight: 600; line-height: 31px; padding: 4px 10px; text-transform: capitalize; border-radius: 30px 30px; letter-spacing: 1px; border: none; display: inline-block; position: relative; transition: all 0.3s ease-in-out; z-index: 1; } .link:hover, .link:focus{ color: var(--white); transform: translateX(-12px) translateY(-12px); animation: storm .4s linear both; } .link:before, .link:after{ content: ''; background: var(--main-color); width: 100%; height: 100%; border-radius: 100px; opacity: 0; position: absolute; left: 0; bottom: 0; transition: all .3s linear; z-index: -2; } .link:hover:after{ transform: translateX(6px) translateY(6px); opacity: .5; } .link:hover:before{ transform: translateX(12px) translateY(12px); opacity: .3; } @keyframes storm { 0% { transform: translate3d(0, 0, 0) translateZ(0); } 25% { transform: translate3d(4px, 0, 0) translateZ(0); } 50% { transform: translate3d(-3px, 0, 0) translateZ(0);} 75% { transform: translate3d(2px, 0, 0) translateZ(0); } 100% { transform: translate3d(0, 0, 0) translateZ(0); } } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }