This是我的代码:
<input type="textbox" id="txtComune" />
<div id="myOwnMenuComuni" style="position:absolute; top:0; left:0px; height:1px;"></div>
.ui-widget-content a
{
color: #222222 !important;
cursor: pointer !important;
float: left !important;
width: 100% !important;
border:1px solid #ffffff;
}
#myOwnMenuComuni .ui-autocomplete
{
width: 200px !important;
max-height: 150px;
overflow:auto;
padding-right:20px;
}
var listaComuni = ["Abbiategrasso","Acireale","Acquaviva Delle","Acqui Terme","Adelfia","Adrano","Adria","Adro","Agnosine"];
$('#txtComune').autocomplete({
source: listaComuni,
appendTo: "#myOwnMenuComuni"
});
尝试选择输入,插入“a”,然后选择最后一项:这是不可能的。为什么?我该如何解决这个问题?
答案 0 :(得分:1)
如果我取消选中“normalize CSS”并链接到jQuery UI CSS,那么它可以正常工作: 的 jsFiddle 强>
答案 1 :(得分:0)
修复了float:left
display:block
的问题
无论如何,谢谢!