Reactstrap Row 和 Col 未按预期工作
Reactstrap Row and Col are not working as expected
我使用 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 的新手。我哪里会错过什么?
可能您没有在 index.js
文件中导入 Bootstrap CSS,您应该添加:
import 'bootstrap/dist/css/bootstrap.min.css';
在 index.js
或 App.js
文件的顶部
我使用 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 的新手。我哪里会错过什么?
可能您没有在 index.js
文件中导入 Bootstrap CSS,您应该添加:
import 'bootstrap/dist/css/bootstrap.min.css';
在 index.js
或 App.js
文件的顶部