bootstrap-tagsinput 标签
一、问题
input标签无法输入,输入时无法聚焦
二、解决问题
调试发现width为0px,导致input无法点击到;
图一
图一,查看右侧css,发现width:0px !important为element.style(行内样式),此标签input为bootstrap-tagsinput.js动态添加的,即width:0px !important为element.style(行内样式)也是通过js实现的,其宽度获取的是data-role中设置的width(如图二)
图二
添加style="width:210px",解决啦
三、总结
借用bootstrap-tagsinput 标签 添加标签 快捷又方便;
官网 http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/