【发布时间】:2017-08-31 16:01:30
【问题描述】:
我有一个 react 应用程序,它使用 react-bootstrap + bootstrap-sass。
我在我的主 app.scss 中加载 bootstrap.scss 文件,如下所示:
@import '~bootstrap-sass/assets/stylesheets/_bootstrap';
在我的页面中,我从 React-Bootstrap 实现了一个简单的组件。
但是模态窗口没有任何 CSS,所以看起来很糟糕。
我尝试直接加载 modal.scss
@import '~bootstrap-sass/assets/stylesheets/bootstrap/_modals';
但仍然没有应用样式。 (不过,模态会按预期出现和隐藏)。
Bootstrap scss 已加载,因为按钮、下拉菜单等的样式存在。
【问题讨论】:
标签: javascript css reactjs react-bootstrap bootstrap-sass