【发布时间】:2019-08-23 02:42:00
【问题描述】:
我有一行有 3 列,根据屏幕大小,我希望 xsmall(phones) 屏幕采用以下形式:
[A-12]
[B-6][C-6]
对于其他尺寸:
[A-4][B-4][C-4](all in one)
但是我得到了 xs:
[A-12]
[B-6(but it looks like 12?)]
[C-6(but it looks like 12?)]according to outline I drew
我遵循了 react-bootstrap 在responsive grids 下的示例,但我在检查控制台中的实际代码看起来不同。
我在 React 应用中的代码如下所示:
<Jumbotron>
<Grid>
<Row>
<Col>
<!--Stuff goes here not important-->
</Col>
<Col>
<!--Stuff goes here not important similar to the row below-->
<Row>
<Col md={4} sm={4} xs={12}>A</Col>
<Col md={4} sm={4} xs={6}>B</Col>
<Col md={4} sm={4} xs={6}>C</Col>
</Row>
<!--Stuff goes here not important similar to above-->
</Col>
</Row>
</Grid>
</Jumbotron>
现在我在检查我的编译代码和 react-bootstap 时看到的不同之处在于,它们的代码在每列的 html 中没有 :before 和 :after 。我不知道我是否使用错误的引导程序或发生了什么事。我正在使用 react-bootstap 3,因为当我尝试更新到他们的 beta npm 时,我一直在下载引导程序 3 而不是引导程序 4
【问题讨论】:
标签: html reactjs react-bootstrap