Input by elijahgummer
#212121
1.input-field { 2 position: relative; 3 border-bottom: 2px solid #f0f424; 4 margin: 15px 0; 5} 6 7.input-field label { 8 position: absolute; 9 top: 50%; 10 left: 0; 11 transform: translateY(-50%); 12 color: #fff; 13 font-size: 16px; 14 pointer-events: none; 15 transition: 0.15s ease; 16} 17 18.input-field input { 19 width: 100%; 20 height: 40px; 21 background: transparent; 22 border: none; 23 outline: none; 24 font-size: 16px; 25 color: #fff; 26} 27 28.input-field input:focus ~ label, 29.input-field input:valid ~ label { 30 font-size: 0.8rem; 31 top: 10px; 32 transform: translateY(-120%); 33} 34
295 views
295 views
MIT License