是否有一种简单的方法可以将文本输入移动到bootstrap-tagsinput中的标记上方?
这是一个可能说明我的意思的代码:https://codepen.io/uebes/pen/KQEdeP
换句话说,我希望标签在输入文本框之后添加如下:
<div class="bootstrap-tagsinput">
<input type="text" placeholder="">
<span class="tag label label-info"> Test 1<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 2<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 3<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 4<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 5<span data-role="remove"></span></span>
</div>
而不是在文本框之前添加新标记的默认值:
<div class="bootstrap-tagsinput">
<span class="tag label label-info"> Test 1<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 2<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 3<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 4<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 5<span data-role="remove"></span></span>
<input type="text" placeholder="">
</div>
答案 0 :(得分:0)
你的意思是......?
<div class="bootstrap-tagsinput">
<input type="text" placeholder=""><br>
<span class="tag label label-info"> Test 1<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 2<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 3<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 4<span data-role="remove"></span></span>
<span class="tag label label-info"> Test 5<span data-role="remove"></span></span>
</div>
&#13;