0
我想弄清楚如何使標籤顯示在文本框內並將標籤移動到外圍。我想要的一個例子是登錄屏幕https://www.discover.com/當您在用戶名或密碼框內單擊時,您將看到標籤隨着您的注意力進行調整。焦點和不重點標籤移動
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>
會有人請幫助我,他們如何能夠移動的標籤,這樣呢?