【问题标题】:Reactstrap Row and Col are not working as expectedReactstrap Row 和 Col 没有按预期工作
【发布时间】:2021-09-25 15:14:01
【问题描述】:

我使用 reactstrap,我想连续显示 2 个元素,但我得到一列:screenshot

这是我的代码:

export default class Intro extends Component {
    render() {
        return (
            <Container>
                <Row>
                    <Col>HOO</Col>
                    <Col>BAA</Col>
                </Row>
            </Container>
        );
    }
}
function App() {
    return (
            <Intro />
    );
}

我是 React 的新手。我哪里会漏掉一些东西?

【问题讨论】:

    标签: reactjs layout reactstrap


    【解决方案1】:

    可能你没有在index.js文件中导入Bootstrap CSS,你应该添加:

    import 'bootstrap/dist/css/bootstrap.min.css';
    

    index.jsApp.js 文件的顶部

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-13
      • 2013-07-07
      • 2012-12-05
      • 2017-05-22
      • 2019-07-28
      • 2014-05-24
      • 1970-01-01
      相关资源
      最近更新 更多