#212121
1button { 2 height: 4em; 3 width: 15em; 4 border: none; 5 border-radius: 40px; 6 background-color: #fff; 7} 8 9button span { 10 z-index: 1; 11 display: inline-block; 12 background-color: rgb(67, 67, 255); 13 height: 3em; 14 width: 11.5em; 15 border-radius: 25px; 16 color: #fff; 17 line-height: 55px; 18 font-size: 18px; 19 letter-spacing: 3px; 20 transition: all 0.5s; 21} 22 23button .container { 24 z-index: -1; 25 width: 0; 26 position: relative; 27 display: flex; 28 justify-content: center; 29 transform: translateY(-50px); 30 transition: all 0.4s; 31} 32 33button .container svg { 34 padding: 0 10px; 35} 36 37button:hover span { 38 width: 0; 39} 40 41button:hover .container { 42 z-index: 2; 43 width: 100%; 44}
Comments
MIT License