Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 面板.标题颜色变化_Reactjs_React Bootstrap - Fatal编程技术网

Reactjs 面板.标题颜色变化

Reactjs 面板.标题颜色变化,reactjs,react-bootstrap,Reactjs,React Bootstrap,我有这部分代码: <Panel> <Panel.Heading> <Panel.Title toggle> Hello </Panel.Title> </Panel.Heading> <Panel.Collapse> <Panel.Body> Really wide body. Lorem ipsum dolor sit amet, consectetu

我有这部分代码:

<Panel>
  <Panel.Heading>
    <Panel.Title toggle>
      Hello
    </Panel.Title>
  </Panel.Heading>
  <Panel.Collapse>
    <Panel.Body>
      Really wide body. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    </Panel.Body>
  </Panel.Collapse>
</Panel>

你好
真宽的身体。知识是一种美德,是一种美德,是一种美德,是一种美德。但是,在最低限度上,我们需要一个实验室来进行日常工作。两人或两人在一个无教区的房间里互相指责。除偶尔因疏忽而死亡外,不得因疏忽而导致动物死亡。
我希望更改面板标题颜色,但没有关于此元素的文档。有人知道怎么做吗?
提前感谢

不熟悉react引导,但只熟悉css样式?或
style={{backgroundColor:“anyColor”}

不熟悉react引导,但只熟悉css样式?或
style={{backgroundColor:“anyColor”}

要更改面板标题的颜色,可以设置
panel
bsStyle
属性,如下所示:

<Panel bsStyle="primary">
  <Panel.heading>
  ...

...
这将根据引导的颜色样式设置面板顶部的颜色

可用于
bsStyle
的值包括:

  • 默认值
  • primary
  • 成功
  • info
  • 警告
  • 危险
这里有一个例子来说明这一点

很难找到这方面的文档,因为
react bootstrap
(和
reacttrap
)现在使用bootstrap v4
面板
是Bootstrap v3的一部分,但现在已被
取代。通过深入研究一些较旧版本的
react bootstrap
(特别是它们的
bs3 dev
),您可以回顾一下当时的情况

您会注意到,在中,我们需要添加一些旧版本的依赖项(
bootstrap
at
3.4.1
react bootstrap
at
0.32.1


希望这有帮助

要更改面板标题的颜色,可以设置
panel
bsStyle
属性,如下所示:

<Panel bsStyle="primary">
  <Panel.heading>
  ...

...
这将根据引导的颜色样式设置面板顶部的颜色

可用于
bsStyle
的值包括:

  • 默认值
  • primary
  • 成功
  • info
  • 警告
  • 危险
这里有一个例子来说明这一点

很难找到这方面的文档,因为
react bootstrap
(和
reacttrap
)现在使用bootstrap v4
面板
是Bootstrap v3的一部分,但现在已被
取代。通过深入研究一些较旧版本的
react bootstrap
(特别是它们的
bs3 dev
),您可以回顾一下当时的情况

您会注意到,在中,我们需要添加一些旧版本的依赖项(
bootstrap
at
3.4.1
react bootstrap
at
0.32.1

希望这有帮助