7.3K views
1button { 2 background: linear-gradient(-45deg, #3f00b5, #9f69fe, #27c8b7, #3f00b5); 3 background-size: 800% 400%; 4 padding: 1em 2em; 5 display: inline-block; 6 border: none; 7 border-radius: 10px; 8 font-size: 17px; 9 font-weight: 700; 10 color: white; 11 transition: all .5s ease-in-out; 12 animation: gradient 10s infinite cubic-bezier(.62, .28, .23, .99) both; 13} 14 15button:hover { 16 animation: gradient 3s infinite; 17 transform: scale(1.05); 18} 19 20button:active { 21 animation: gradient 3s infinite; 22 transform: scale(0.8); 23} 24 25@keyframes gradient { 26 0% { 27 background-position: 0% 50%; 28 } 29 30 50% { 31 background-position: 100% 50%; 32 } 33 34 100% { 35 background-position: 0% 50%; 36 } 37}
MIT License