使用Icon Bootstrap 搜尋輸入
Bootstrap 在版本4 中不再支援Glyphicons,因此想要向搜尋輸入新增圖示的使用者必須找到替代方案方法。
Bootstrap 5 Beta(2021 年)更新)
<div class="input-group"> <input class="form-control border-end-0 border rounded-pill" type="text" value="search"><p><strong>Bootstrap 4(原始解決方案)</strong></p> <p>使用🎜>使用🎜></p>使用🎜>使用🎜>使用🎜><pre class="brush:php;toolbar:false"><div class="input-group col-md-4"> <input class="form-control py-2" type="search" value="search">使用🎜>使用🎜>使用🎜><p>使用🎜>使用🎜>使用🎜> Bootstrap 4 輸入組元素:<strong></strong></p> <pre class="brush:php;toolbar:false"><div class="input-group col-md-4"> <input class="form-control py-2 border-right-0 border" type="search" value="search">內部輸入邊框:<p><strong></strong></p> <pre class="brush:php;toolbar:false"><div class="input-group"> <input class="form-control py-2 border-right-0 border" type="search" value="search">無背景的輸入組文字:<p><strong></strong>無背景的輸入組文字:</p> <pre class="brush:php;toolbar:false"><div class="row no-gutters"> <div class="col"> <input class="form-control border-secondary border-right-0 rounded-0" type="search" value="search"><p>無背景的輸入組文字:<strong></strong></p>無背景的輸入組文字:<pre class="brush:php;toolbar:false"><div class="input-group"> <span class="input-group-prepend"> <div class="input-group-text bg-transparent border-right-0"> <i class="fa fa-search"></i> </div> </span> <input class="form-control py-2 border-left-0 border" type="search" value="..."><p><strong> </strong></p> <pre class="brush:php;toolbar:false"><div class="input-group is-invalid"> <input class="form-control" type="search" value="">無裝訂線間距的網格(行>列) :前置圖示:前置圖示:前置圖示:前置圖示:前置圖示:前置圖示:前置圖示:前置圖示:前置圖示: 驗證圖示:</div>
以上是如何在 Bootstrap 4 和 5 中新增圖示到搜尋輸入?的詳細內容。更多資訊請關注PHP中文網其他相關文章!