0
テキストボックス内にラベルを表示し、ラベルを周囲に移動する方法を理解しようとしています。私がこれをどのようにしたいかの例は、https://www.discover.com/のログイン画面です。ユーザーIDまたはパスワードボックスの内側をクリックすると、フォーカスの出入りに合わせてラベルが調整されます。フォーカスが合っていないときのラベル移動
https://jsfiddle.net/bobrierton/Ls1c4fdj/
<div class="input-wrapper userid-wrapper">
<label for="userid-content" class="user-id-label">User ID</label>
<input type="text" class="form-control userid user-id-input" name="userID" id="userid-content" aria-required="true" data-toggle="popover" data-content="Please enter your User ID" maxlength="16" />
</div>
<div class="input-wrapper password-wrapper">
<label for="password-content" class="password-label">Password</label>
<input type="password" class="form-control password password-input" name="password" id="password-content" aria-required="true" data-toggle="popover" data-content="Please enter your Password" maxlength="32"/>
</div>
誰かが、彼らはそのようにラベルを移動することができる方法で私を支援してくださいだろうか?