【发布时间】:2019-02-23 17:00:56
【问题描述】:
在我的 jQuery v3 / Bootstrap v4.1.2 应用程序中,我使用了 selected.jquery(版本 1.8.7),但我没有找到如何使用以下样式设置所选选择输入的占位符文本的颜色:
::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: #c2c200 !important;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #c2c200 !important;
opacity: 1 !important;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #c2c200 !important;
opacity: 1 !important;
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: ##c2c200 !important;
}
::-ms-input-placeholder { /* Microsoft Edge */
color: #c2c200 !important;
}
::placeholder { /* Most modern browsers support this now. */
color: ##c2c200 !important;
}
我用代码初始化它:
$(".chosen_select_box").chosen({
disable_search_threshold: 10,
allow_single_deselect: true,
no_results_text: "Nothing found!",
});
你可以看看这个小提琴: http://jsfiddle.net/1Lpdk79r/3/
但它不适用于选定的输入。如何解决?
【问题讨论】:
-
你想改变什么颜色? “选择项目”文本,如果选择下拉列表中的“pomme”或显示为药丸时的“pomme”?
标签: css bootstrap-4 jquery-chosen