有沒有辦法實現這樣的事情:添加與邊境fontawesome圖標到表單輸入
我已經試過了,我發現這裏的堆棧選項(使用範圍),但即使我做了它的工作,我不可能在圖標的右邊做那條白線,有人可以幫我嗎?
我當前的代碼看起來像這樣:
<form>
<input type="text" name="firstname" placeholder="Name">
<input type="text" name="firstname" placeholder="e-mail">
<input type="text" name="firstname" placeholder="website">
</form>
我也嘗試添加該圖標在容器邊框達到的效果:
<form>
<span class="form_frame"><i class="fa fa-user-circle-o" aria-hidden="true"></i>
</span>
<input type="text" name="firstname" placeholder="Name">
和CSS:
.form_frame {
height: 60px;
border-width: 1px solid;
border-color: white;
width: 100%;
background-color: #2b2b2b;
但是沒有成功
感謝您的幫助。
你應該告訴我們你的代碼,所以我們可以看看它。 – Robert
檢查此答案並使用帶邊框的
。 http://stackoverflow.com/questions/25708569/font-awesome-icons-in-html-form希望它有幫助 –@Robert更新了我的帖子 – Miyagi