<div class="floating-group">
<input type="text" id="username" class="floating-input" placeholder=" " required>
<label for="username" class="floating-label">Username</label>
</div>
<div class="floating-group">
<input type="password" id="userpass" class="floating-input" placeholder=" " required>
<label for="userpass" class="floating-label">Password</label>
</div>
Back to Snippets
Floating Label Input CSS
Create a polished form experience with floating labels. The label rests inside the input field and moves up smoothly when the user clicks or types, which mimics the popular Material Design style.
391