#e8e8e8
1button { 2 position: relative; 3 width: 130px; 4 height: 35px; 5 border-radius: 30px; 6 background-color: white; 7 border: 1px #000000 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: #000000; 43} 44 45.icon::after { 46 position: absolute; 47 left: 0.5px; 48 top: 0.5px; 49 z-index: -1; 50 content: ''; 51 width: 32px; 52 height: 32px; 53 border-radius: 100%; 54 background-color: white; 55} 56 57button:hover .icon { 58 transform: translateX(97.5px); 59 transition: transform 0.5s; 60} 61 62button:hover .text2 { 63 transform: translateX(100px); 64 transition: transform 0.6s; 65} 66 67button:active { 68 transform: scale(1.03); 69}
840 views
840 views
Comments
Variations
9andrew-demchenk0
429 views
andrew-demchenk0
412 views
andrew-demchenk0
383 views
andrew-demchenk0
348 views
andrew-demchenk0
345 views
andrew-demchenk0
341 views
andrew-demchenk0
313 views
andrew-demchenk0
303 views
MIT License