简体   繁体   English

如何在 MD Bootsrap React 中更改按钮组件的字体和边框颜色

[英]How to change the font and border color of the Button Component in MD Bootsrap React

So I'm using a button component from MDBootrap .所以我使用了MBootrap的按钮组件。 To be specific I'm using an Outline Button Component which looks like this:具体来说,我正在使用一个如下所示的大纲按钮组件

在此处输入图片说明

The code that's given on the website for this particular component is as follows:网站上为该特定组件提供的代码如下:

<button type="button" class="btn btn-outline-warning">Warning</button>

I was wondering if there's a way around to change the font color as well as the border color of this button component since at the moment it's not matching well with the theme of my website.我想知道是否有办法更改此按钮组件的字体颜色和边框颜色,因为目前它与我网站的主题不太匹配。 Thanks!谢谢!

If you want to reuse styles, create a new css class:如果要重用样式,请创建一个新的 css 类:

.btn.my-cusomized-button {
    border-color: pink;
    color: pink;
    background-color: transparent;
    border: 1px solid pink;
}
<button
  type="button"
  class="btn my-cusomized-button"
>
  Primary
</button>

nb css class my-cusomized-button and pink as color are just an example. nb css class my-cusomized-buttonpink只是一个例子。 Use your colors and class which better suits your need使用更适合您需要的颜色和类别

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM