这就是autcomplete现在显示结果的方式。它在搜索栏的后面。是否可以将其带到上方。另外,我想为其设置样式。有人可以给一些样式参考。
以下是标头容器的代码
.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;
}
样式:
input#autocomplete {
/* styles here */
}
z-index :( 最好使用z-index来防止元素堆叠时沿途出现其他问题)
了解z-index
和堆叠顺序。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句