样式jQuery自动完成结果

时间:2014-02-13 05:01:27

标签: jquery jquery-ui-autocomplete

这就是自动填充功能现在显示结果的方式。enter image description here 它位于搜索栏后面。有可能把它带到上面。另外,我想要它的风格。有人可以提供一些风格参考。

以下是header-container

的代码
.header-container {
position: fixed;
top: 0;
background-color: #1E1E1E;
width: 100%;
z-index: 2000;
height: 42px;
}

这是搜索输入:

#header-search-input {
background-image: url(images/search.png);
background-repeat: no-repeat;
font-size: 12px;
-moz-border-radius: 3px;
border-radius: 3px;
color: #424A61;
border: none;
font-size: 14px;
height: 22px;
width: 355px;
position: absolute;
top: 9px;
overflow: hidden;
right: 40%;
padding-left: 25px;
}

2 个答案:

答案 0 :(得分:0)

好的,我通过airi建议将z-index改为2来修复它。虽然,我真的没有解决问题的方法。

答案 1 :(得分:0)

设计风格:

input#autocomplete { 
 /* styles here */
}

z-index: (最好是正确使用z-index以防止在路上出现其他问题并堆叠您的元素)

了解z-index和堆叠顺序。