如何将 bootstrap 的标签输入与 textarea 标签 (data-role="tagsinput") 一起使用
How to use tags input of bootstrap with textarea tag (data-role="tagsinput")
<textarea id="Box" class="tags form-control" placeholder="X Axis values"></textarea>
我想在带有删除选项的标记方式中在文本框区域中显示用户选择的选项。
如何在textarea中使用bootstrap的标签输入?我应用了 data-role="tagsinput"。但是标签输入不起作用。正如我们所知,我们在 Whosebug 中遇到了同样的问题。但对此没有解决方案。
为此 How to use tags input of bootstrap with textarea
需要 solution/hint
Bootstrap 标签输入 does not work with textarea
。不提供支持。
但是您可以将它与 input type="text"
一起使用并应用以下 css 使其像 textarea 一样工作。
.bootstrap-tagsinput {
min-height: 100px;
}
试试这个 css 在输入文本上滚动 Input Like textarea
.tags-input {
max-width: 100%;
line-height: 22px;
overflow-y: scroll;
overflow-x: scroll;
height: 65px;
cursor: text;
}
按照这一步
<style>
.bootstrap-tagsinput {
line-height: 15px !important;
min-height: 165px;
padding-top: 20px;
padding-bottom: 20px
}
span.tag.label {
position: relative;
float: left;
margin: 2px 5px;
}
.bootstrap-tagsinput input {
position: relative;
float: left;
height: auto;
margin-top: 4px;
margin-left: 5px;
padding: 0px;
text-align: left;
width: auto;
}
<style/>
<input type="text" class="form-control inputtags" data-role="tagsinput" name="keywords">
<textarea id="Box" class="tags form-control" placeholder="X Axis values"></textarea>
我想在带有删除选项的标记方式中在文本框区域中显示用户选择的选项。
如何在textarea中使用bootstrap的标签输入?我应用了 data-role="tagsinput"。但是标签输入不起作用。正如我们所知,我们在 Whosebug 中遇到了同样的问题。但对此没有解决方案。
为此 How to use tags input of bootstrap with textarea
需要 solution/hintBootstrap 标签输入 does not work with textarea
。不提供支持。
但是您可以将它与 input type="text"
一起使用并应用以下 css 使其像 textarea 一样工作。
.bootstrap-tagsinput {
min-height: 100px;
}
试试这个 css 在输入文本上滚动 Input Like textarea
.tags-input {
max-width: 100%;
line-height: 22px;
overflow-y: scroll;
overflow-x: scroll;
height: 65px;
cursor: text;
}
按照这一步
<style>
.bootstrap-tagsinput {
line-height: 15px !important;
min-height: 165px;
padding-top: 20px;
padding-bottom: 20px
}
span.tag.label {
position: relative;
float: left;
margin: 2px 5px;
}
.bootstrap-tagsinput input {
position: relative;
float: left;
height: auto;
margin-top: 4px;
margin-left: 5px;
padding: 0px;
text-align: left;
width: auto;
}
<style/>
<input type="text" class="form-control inputtags" data-role="tagsinput" name="keywords">