Bootstrap Vue-更改下拉背景 [英] Bootstrap Vue - change dropdown background

查看:218
本文介绍了Bootstrap Vue-更改下拉背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm using Bootstrap Vue plugin - https://bootstrap-vue.js.org/

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

I need to change dropdown menu default background when someone select value from dropdown like this.

但这是问题所在.当有人单击下拉列表时,他们会在下拉列表包装器中切换显示"类.没有针对红色突出显示的div的任何新类.

But this is the problem. When someone click dropdown, They toggle "show" class in dropwdown wrapper. No any class new class for red color highlighted div.

我尝试设置.dropdown-toggle类的样式,但它仅覆盖默认样式.有什么办法吗?

I tried to style .dropdown-toggle class but it overrides default style only. Any solution?

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

Jsfiddle

Jsfiddle

推荐答案

  <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      <span class="sr-only">Toggle Dropleft</span>

代替btn btn-辅助更改按钮类(例如危险,主要等).有关更多信息,请单击此链接

In the place of btn btn-secondary change button classes like danger,primary, etc.... for more information follow this link

https://getbootstrap.com/docs/4.0/components/dropdowns/

这篇关于Bootstrap Vue-更改下拉背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆