460 views
1.btn { 2 position: absolute; 3 top: 50%; 4 left: 50%; 5 transform: translate(-50%, -50%); 6 font-size: 25px; 7 font-weight: 600; 8 height: 40px; 9 line-height: 40px; 10 cursor: pointer; 11 background-color: inherit; 12 border: none; 13 outline: none; 14 color: #f1f1f1; 15} 16 17.btn:hover .background { 18 height: inherit; 19 width: 120%; 20 top: 50%; 21} 22 23.btn .background { 24 position: absolute; 25 top: 100%; 26 left: 50%; 27 transform: translate(-50%, -50%); 28 height: 3px; 29 width: 100%; 30 background-color: #006b92; 31 z-index: -1; 32 border-radius: 5px; 33 transition: all 0.3s; 34}
garerim
Matheo GARERI
MIT License