Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/24.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 单击reactstrap和SCS中的按钮时不应用颜色更改_Reactjs_Sass_Frontend_Reactstrap - Fatal编程技术网

Reactjs 单击reactstrap和SCS中的按钮时不应用颜色更改

Reactjs 单击reactstrap和SCS中的按钮时不应用颜色更改,reactjs,sass,frontend,reactstrap,Reactjs,Sass,Frontend,Reactstrap,在jsx中 在上面的代码中,hover和focus应用得很好,但是在active中,Bootstrap的第二颜色被应用。 为什么不能仅在单击(活动)时应用它?请在开发工具中查看您的样式是否被引导的样式覆盖,并使用!重要信息如有必要 <Button onClick={emailSubmit} color="primary" className="submitButton">Submit</Button> .submitButton

在jsx中

在上面的代码中,hover和focus应用得很好,但是在active中,Bootstrap的第二颜色被应用。
为什么不能仅在单击(活动)时应用它?

请在开发工具中查看您的样式是否被
引导的样式覆盖,并使用
!重要信息
如有必要
<Button onClick={emailSubmit} color="primary" className="submitButton">Submit</Button>
.submitButton {
 margin-top: 10px;
 background-color: white;
 border-color: $lightorange;
 color: $lightorange;

&:hover, &:focus, &:active {
  background-color: $lightorange;
  color: white;
  border-color: $lightorange;
}