javascript - 如何相对于单击的按钮对齐 react-bootstrap 模式
问题描述
我有一个 react-bootstrap-modal this,我想显示相对于单击的按钮的模态,我的 react-bootstrap-table 中有一个选项,所以当我单击该选项时,我正在显示我的模态,但它不是相对对齐。
我正在使用
contentClassName
覆盖.modal-content
,我不知道,但它没有按预期工作<Modal show={props.show} onHide={props.handleClose} contentClassName="modal_l" // this is I am doing to override aria-labelledby="example-custom-modal-styling-title"> <div className="container_modal_options"> <div className="heading">Heading</div> <div className="content">"content</div> </div> </Modal>
在这里我分享最少的代码,
.modal_l {
width: 100px !important; it is not taking styling
}
我想在右侧显示模态,点击附近
解决方案
您应该更改contentClassName
为dialogClassName
.
.modal_l {
width: 100px !important;
max-width: none !important;// set max-width, if needed.
}
推荐阅读
- c# - 如何在后台运行代码时将数据提供给 div 标签
- python - Python函数在循环内不起作用
- python - 我怎样才能打印这个类的属性;;结果没有按预期返回?
- haskell - Haskell:理解 foldl 函数
- javascript - 更改同一行的值列
- java - 创建 Spring Boot Otka 资源服务器时出现异常
- r - 无法绘制数据子组的均值
- python - 如何以不同的方式更新屏幕的字体?
- javascript - 如何将来自 URL 的参数值作为变量插入到 Google Analytics(分析)代码中?
- java - 如何使用来自 foreach 的被调用函数的返回值