How to change background-color option in bootstrap-select?

≯℡__Kan透↙ 提交于 2019-12-31 01:25:11

问题


I'm using bootstrap-select (from Silvio Moreto). I would like to change background-color and font color of list item. By default is :

And I would like something like :

I tried this, but nothing change :

.bootstrap-select.btn-group .dropdown-menu li:hover{
      background-color: rgb(191, 82, 121);
      color: white;
}

Any idea ?


回答1:


I answered my own question :

 .bootstrap-select.btn-group .dropdown-menu li a:hover {
     color: whitesmoke !important;
     background: #bf5279 !important;
 }

Thanks ;-) !




回答2:


Without a demo or live-site my only guesses would be to either use "!important" on background-color or check if your css selector ist right. What happens, if you change outline or border? If nothings happens, i would think, that your selector is wrong or your css isn´t even included.




回答3:


I have changed all of them with something like this:

button[data-toggle="dropdown"].btn-default,
button[data-toggle="dropdown"]:hover {
background-color: white !important;
color: #2c3e50 !important;
border: 2px solid #dce4ec;
}


来源:https://stackoverflow.com/questions/39661592/how-to-change-background-color-option-in-bootstrap-select

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!