如何在引导提示中更改文本颜色

时间:2019-03-20 19:27:49

标签: css vue.js bootstrap-4

想要带有白色文本的深蓝色背景上的按钮

xxx.vue中的代码

.velocity

样式是

 <b-dropdown text="user" right variant="blue" class="signout-button">
    <b-dropdown-item @click="toMain()">sign out</b-dropdown-item>
 </b-dropdown>

结果看起来像这样

enter image description here

它仍然返回文本

2 个答案:

答案 0 :(得分:2)

例如,应该执行此操作,因为b-dropdown会在内部生成该按钮标签。

.signout-button button{
  color: red;
}

答案 1 :(得分:1)

好吧,您需要在# view from .lib.rest import Rest from django.shortcuts import get_object_or_404 class AssinaturaUpdate(): ... def post(self, request, id): assinatura = get_object_or_404(Assinatura, id=id) form = FormAssinatura(request.POST) if form.is_valid(): Rest().update(form.cleaned_data, id) return redirect('assinatura_edit', id=id) # rest class Rest(): def trocaPlano(self, assinatura_id): payload = { "id": assinatura_id } print(payload) def update(self, data, assinatura_id): self.trocaPlano(assinatura_id) headers = {"Content-Type": "application/json", "Accept": "application/json", "Authorization": TOKEN} # <-- How this token comes here r = requests.put(url='https://rest.com/subscriptions/'+assinatura_id, data=json.dumps(payload), headers=headers) 编译后将其转换为<b-dropdown>标签的样式。

button

这里在工作Jsfiddle

希望这会有所帮助!