Reactstrap Row 和 Col 未按预期工作

我使用 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 的新手。我哪里会错过什么?

cjh0971 回答:Reactstrap Row 和 Col 未按预期工作

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

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

index.jsApp.js 文件的顶部

本文链接:https://www.f2er.com/82448.html

大家都在问