自动完成建议列表错误的z-index,我该如何改变?

时间:2011-01-21 22:57:24

标签: jquery css autocomplete z-index

似乎我的自动完成列表了它的< z-index比我网站的某些元素所以它暴露在外,我应该编辑哪个类?

使用editCSS我播种这些类,并添加(我的网站的z-index,但很少有不影响的是1)

.ui-corner-all, .ui-menu-item, #ingredientes_s.ui-autocomplete-input{z-index: 20;}

但仍然存在同样的问题..

1 个答案:

答案 0 :(得分:1)

jQuery UI自动填充选项列表通过获取附加到的文本输入的z-index来计算其z-index值,并将该值加1。

因此,您可以为文本输入提供999的z-index,自动完成将具有z-index值1000

取自http://bugs.jqueryui.com/ticket/5489

<input type="text" class="autocomplete" style="z-index:999;" name="foo">