【发布时间】:2021-02-28 08:56:06
【问题描述】:
您好,我正在尝试使用电子创建应用程序并集成引导程序。当我尝试导航栏(从 doc 复制和粘贴)时,它的显示效果不佳。
在任何搜索之后,我检查了我的导入,但对我来说一切正常。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script scr="../node_modules/bootstrap/dist/js/bootstrap.js"></script>
</head>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">WebSiteName</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</nav>
<body>
<h1>Bonjour le monde !</h1>
Nous utilisons Node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
et Electron <script>document.write(process.versions.electron)</script>.
<button id="btn">button</button>
<button type="button" class="btn-success">Basic</button>
<script>
require('./renderer')
window.$ = window.jquery = require('../node_modules/jquery/dist/jquery.js') // I also tried with only require('jquery')
require('../node_modules/bootstrap/dist/js/bootstrap.js')
</script>
</body>
</html>
【问题讨论】:
标签: jquery node.js twitter-bootstrap electron