【发布时间】:2020-08-30 10:01:59
【问题描述】:
第一次在这里提问。我刚开始使用电子 js 制作桌面应用程序,当我尝试将外部样式表加载到我的 index.html 文件中时,它不起作用。这是我的 HTML:
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bundle</title>
<meta name="viewport" content="width=device-width, inital-scale=1.0">
<link rel="stylesheet" type="style.css"
href="https://raw.githubusercontent.com/AlessioToniolo/Bundle/master/style.css">
</head>
<body>
<div class="header-separation">Hello</div>
<script src="main.js"></script>
<script>
/* const electron = require('electron');
const {ipcRenderer} = electron;
ipcRenderer.send('item:add', item);
*/
// For other window:
/* previous code plus
ipcRenderer.on('item:add', (e, item) => {
})
*/
</script>
</body>
</html>
当我最初尝试链接到我的外部样式表时,我只是使用了路径而不是 URL,但是当它不起作用时,我尝试从确实有效的 CSS 框架加载另一个样式表。我究竟做错了什么?谢谢!
【问题讨论】:
标签: javascript html css node.js electron