【问题标题】:Reactstrap's col-0 doesn't work as expected in NextJS 12Reactstrap 的 col-0 在 NextJS 12 中无法按预期工作
【发布时间】:2022-02-15 06:12:36
【问题描述】:

刚刚安装了 NextJS 12,我正在开发一个小型应用程序,但是当我想使用大小为 0 的 Col 时,它无法按预期工作,这是我的 JSX 代码:

<Container>
  <Row>
      <Col xs="0">hello</Col>
    <Col>world</Col>
  </Row>
</Container>

这是我得到的结果:

这是我的依赖:

这是我的进口:

这是为被检查元素生成的 CSS:

我不知道这是某个库中的错误还是我的错误

【问题讨论】:

    标签: reactjs next.js react-bootstrap reactstrap


    【解决方案1】:

    这似乎是 bootstrap 5 包中的一个错误,现在我找到了一个解决方案,将 bootstrap 版本从 5 降级到 4.1

    对于纱线:

    yarn add bootstrap@4.1
    

    对于 NPM:

    npm i bootstrap@4.1
    

    【讨论】:

      猜你喜欢
      • 2021-09-25
      • 1970-01-01
      • 2014-11-02
      • 2019-03-11
      • 2019-12-18
      • 2019-12-07
      • 2022-12-31
      • 2020-04-22
      • 1970-01-01
      相关资源
      最近更新 更多