【发布时间】:2014-07-16 17:55:41
【问题描述】:
如何自定义 jquery 自动完成组合框 css 以便我可以让它看起来像在图片中以更改其悬停样式?
我的部分代码是
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
.ui-autocomplete, .ui-autocomplete:hover,
.ui-menu-item, .ui-menu-item:hover,
.ui-menu-item a, .ui-menu-item a:hover,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-focus,
.ui-menu .ui-menu-item a.ui-state-active,
.ui-menu .ui-menu-item a {
background-color: white;
text-wrap: none;
font-weight: normal;
color: black;
}
.custom-combobox-toggle {
position: absolute;
top: 0;
bottom: 0;
margin-left: -1px;
padding: 0;
/* support: IE7 */
*height: 1.7em;
*top: 0.1em;
width: 40px;
color: white;
border: thin;
border-color: blue;
}
.ui-autocomplete {
max-height: 200px;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
/* add padding to account for vertical scrollbar */
position: absolute;
font-style: normal;
}
图片:现有外观
【问题讨论】:
-
你是说蓝色焦点?
-
蓝色焦点和白色字体颜色
-
你身边有
jquery-ui.css吗? -
是的,包含jquery-ui.css
标签: jquery css autocomplete hover