javascript - Bootstrap Vue - 更改下拉背景

标签 javascript jquery html css twitter-bootstrap

我正在使用 Bootstrap Vue 插件 - https://bootstrap-vue.js.org/

当有人像这样从下拉菜单中选择值时,我需要更改下拉菜单的默认背景。

enter image description here

enter image description here

但这就是问题所在。当有人单击下拉菜单时,他们会在下拉菜单包装器中切换“显示”类。红色突出显示的 div 没有任何类新类。

enter image description here

我尝试设置 .dropdown-toggle 类的样式,但它仅覆盖默认样式。任何解决方案?

.dropdown-toggle{
  background-color: #FF5722;
  border-color: #FF5722;
}

Jsfiddle

最佳答案

你可以直接在风格上做。例如:

  <b-form-select
  options="[1, 2, 3]"
  style="background: red">
</b-form-select>

或者创建一个类...

关于javascript - Bootstrap Vue - 更改下拉背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48699688/

相关文章:

javascript - 使用 jQuery 移动元素

javascript - jquery背景图像旋转脚本不起作用

javascript - jQuery 组合多个元素

javascript - 在 Chrome 上运行时,图像使用 jsPDF 显示在同一 HTML 页面上,而不是打开 PDF View

html - 文本在跨度内右对齐

javascript - 如何使用不同的@Injectable进行开发和生产

javascript - 如何使用 jsmad?

javascript - 将事件元素状态绑定(bind)到 jquery AJAX 请求

javascript - 如何根据页面位置实现 ng-show

html - 如何在响应后使用真棒字体并调整占位符名称的大小