select2改变背景颜色 [英] select2 change background color
本文介绍了select2改变背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在我正在创建的网页上使用select2。然而,组合框背景似乎是透明的,但我需要将其改为另一种颜色。我尝试修改 select2.css
文件,但似乎没有任何效果。有什么想法吗?
I am trying to use select2 on a webpage I am creating. However the combobox background seems to be transparent but I need to change it to another color. I tried modifying the select2.css
file but nothing seems to work. Any Ideas ?
推荐答案
如果您尝试定位组合框包装,请使用
If you are trying to target the combo box wrapper use
.select2-search { background-color: #00f; }
如果您尝试定位输入,请使用
If you are trying to target the input use
.select2-search input { background-color: #00f; }
如果您尝试定位结果包装器,请使用
And if you are trying to target the results wrapper use
.select2-results { background-color: #00f; }
希望这有帮助!
这篇关于select2改变背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文