您好我正在关注本教程(https://www.bigbinary.com/videos/keep-up-with-reactjs/creating-a-bootstrap-modal-in-react-js)
灰色图层不允许我使用模态,事实上我已经检查了css文件或属性,但我不知道我要放在哪里或者我应该把它放在哪里解决它。
piss帮助我:D:D这是我的代码:
Login.js
import React, { Component,PropTypes } from 'react';
class Login extends React.Component {
render() {
return (
<div>
<button type="button" id='ingresar' data-toggle="modal" data-target="#myModal">
Ingresar
</button>
<div className="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header">
<button type="button" className="close" data-dismiss="modal"><span aria-hidden="true">×</span><span className="sr-only">Close</span></button>
<h4 className="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div className="modal-body">
...
</div>
<div className="modal-footer">
<button type="button" className="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" className="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</div>
);
}
}
答案 0 :(得分:0)
我有同样的问题。我发现我的问题与fade
类有关。一旦我删除它,我的问题就解决了。