gpt4 book ai didi

html - 如何垂直显示 "tagsinput"?

转载 作者:行者123 更新时间:2023-11-28 04:31:48 25 4
gpt4 key购买 nike

我正在使用 Jquery“tagsinput”让用户在输入字段中创建标签。

我想垂直显示标签而不是内嵌。
此外,当您输入类似“1300x1300”的内容时,输入似乎没有覆盖 100% 的宽度。

我该如何解决这个问题?

HTML

<table>
<tr>
<td class="oppningarTd">
<input type="text" class="oppningar" data-role="tagsinput" multiple="true" />
</td>
</tr>
</table>

CSS

.bootstrap-tagsinput {
background-color: #fff;
border: 1px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
color: #555;
vertical-align: middle;
width: 100%;
cursor: text;
white-space: pre; //Just trying something
}

td.oppningarTd {
border: 1px solid black;
background: white;
text-align: center;
width: 200px !important;
}

input.oppningar {
width: 100% !important;
text-align: center;
}

fiddle
https://jsfiddle.net/Lh4jy9d4/151/

最佳答案

感谢@CBroe 的评论,我成功更改了插件的 CSS。

.bootstrap-tagsinput {
background-color: white;
border: 0px;
width: 100%;
cursor: text;
}
.bootstrap-tagsinput input {
border: none;
box-shadow: none;
outline: none;
background-color: transparent;
padding: 0;
margin: 0;
}
.bootstrap-tagsinput.form-control input::-moz-placeholder {
color: #777;
opacity: 1;
}
.bootstrap-tagsinput.form-control input:-ms-input-placeholder {
color: #777;
}
.bootstrap-tagsinput.form-control input::-webkit-input-placeholder {
color: #777;
}
.bootstrap-tagsinput input:focus {
border: none;
box-shadow: none;
}
.bootstrap-tagsinput .tag {
margin: 4px;
color: white;
display: block;
}
.bootstrap-tagsinput .tag [data-role="remove"] {
float: right;
cursor: pointer;
color: red;
}
.bootstrap-tagsinput .tag [data-role="remove"]:after {
content: "x";
padding: 0px 2px;
}
.bootstrap-tagsinput .tag [data-role="remove"]:hover {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.bootstrap-tagsinput .tag [data-role="remove"]:hover:active {
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}

关于html - 如何垂直显示 "tagsinput"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41692159/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com