electron bootstrap

model:

<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    <title>Hello, world!</title>
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  </body>
</html>

In electron:

1,get bootstrap css
2,get jquery.js
3,get popper.js
4,get bootstrap.js
Then in index.html:
you can use it by :

  <link href="css/bootstrap.min.css" rel="stylesheet">
    <script>

        window.$ = window.jQuery = require('./js/jquery.slim.min.js');
    
       require('./js/bootstrap.min.js');
    </script>

you must see the "./"

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 果园覆盖有哪些好处 果园覆盖有哪些好处 (1)减少水分流失,提高土壤含水量:在自然条件下土壤表层受雨滴的直接冲击,...
    旧事_302f阅读 3,301评论 0 0
  • 听完今天的课程又是收获满满,不断的自省和学习可以保持公号的新鲜度和生长力。根据Judy老师介绍的几种方法并...
    徐菡芮阅读 1,196评论 0 0
  • 傻瓜, 别再等了, 车已走远, 人已无踪。 傻瓜, 别再想了, 泪已流干, 心无所属。 傻瓜, 别再爱了, 倾情付...
    听雨轩0755阅读 1,020评论 0 0
  • 7月25日:今天我们总算要去知北游了!最早我一看票我已为我不能和王晟权一间了!可后来一换我和他又到了一间而且还不错...
    Michaelzxq阅读 3,269评论 1 0