Button by andrew-demchenk0
#e8e8e8
1button { 2 position: relative; 3 width: 130px; 4 height: 35px; 5 border-radius: 30px; 6 background-color: white; 7 border: 1px #FFB700 solid; 8 overflow: hidden; 9} 10 11.text1 { 12 font-size: 15px; 13 font-weight: 600; 14 margin-left: 22%; 15} 16 17.text2 { 18 position: absolute; 19 top: 25%; 20 left: -50px; 21 font-weight: 700; 22 font-size: 14px; 23 color: white; 24} 25 26.icon { 27 position: absolute; 28 top: 0; 29 left: 0; 30 transition: transform 0.5s; 31} 32 33.icon::before { 34 position: absolute; 35 left: -100px; 36 top: 0; 37 z-index: -1; 38 content: ''; 39 width: 130px; 40 height: 33px; 41 border-radius: 30px; 42 background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); 43 ; 44} 45 46button:hover .icon { 47 transform: translateX(96px); 48 transition: transform 0.5s; 49} 50 51button:hover .text2 { 52 transform: translateX(100px); 53 transition: transform 0.6s; 54} 55 56button:active { 57 transform: scale(1.03); 58}
844 views
Variation of abutton
MIT License