#e8e8e8
1button { 2 position: relative; 3 width: 130px; 4 height: 35px; 5 border-radius: 30px; 6 background-color: white; 7 border: 1px #00acee solid; 8 overflow: hidden; 9} 10 11.text1 { 12 font-size: 17px; 13 font-weight: 700; 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-color: #00acee; 43} 44 45button:hover .icon { 46 transform: translateX(96px); 47 transition: transform 0.5s; 48} 49 50button:hover .text2 { 51 transform: translateX(100px); 52 transition: transform 0.6s; 53} 54 55button:active { 56 transform: scale(1.03); 57}
Comments
MIT License