问题
I am using bootstrap for UI and jquery custome UI for autocomplete. When suggested items are listed, i would like to match bootstratp blue color instead of yellow. Where can I chnage the color and what is the correct hex ? Please see the attched image. Thanks!
回答1:
.ui-state-hover {
background: #428BCA!important;
}
Example:
http://jsfiddle.net/trevordowdle/DLLVw/104/
回答2:
After a loot of tries, I found a working code for myself. After reading the entire jquery UI CSS file I found that #c77405 was the colour responsible for this orange effect. You can use notepad++ for finding all occurrences of this colour.you can copy and paste the following code in your file as internal CSS.
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #5b518b; /* any color you like */
}
.ui-widget-content .ui-state-active {
color: #5b518b; /* any color you like */
}
来源:https://stackoverflow.com/questions/20803295/jquery-autocomplete-color-change