【问题标题】:Use Electron with Bootstrap 5 doesn't work在 Bootstrap 5 中使用 Electron 不起作用
【发布时间】:2021-10-04 04:17:30
【问题描述】:

我正在创建我的第一个电子应用程序,并希望使用 bootstrap 5 进行一些样式设置。 所以我:

(1) 通过 npm i --save bootstrap jquery popper.js 安装必要的模块

(2) 创建了一个包含@import '~bootstrap/scss/bootstrap'的main.scss;

(3) 放入我的 index.html 的头部:

   <link rel="stylesheet" href="./contents/bootstrap/5.0.2/css/bootstrap.min.css" />
    <script>let $ = require('jquery');</script>
    <script>require('popper.js');</script>
    <script>const bootstrap = require('bootstrap');</script>

之后,我从引导文档中复制并粘贴了一个导航栏。我不知道出了什么问题,我没有找到任何答案。感谢您的帮助。

【问题讨论】:

    标签: javascript node.js twitter-bootstrap electron bootstrap-5


    【解决方案1】:

    Bootstrap 5 不再使用 jQuery。

    只要做:

    npm i --save bootstrap@latest

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-14
      • 1970-01-01
      • 2022-10-08
      • 2018-12-28
      • 1970-01-01
      • 1970-01-01
      • 2021-05-07
      相关资源
      最近更新 更多