我正在尝试使用 Prismjs https://prismjs.com/index.html文件突出显示插件https://prismjs.com/plugins/file-highlight/突出显示 C++ 文件。所以我尝试了:
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
<link href="themes/prism.css" rel="stylesheet" />
</head>
<body>
<script src="prism.js"></script>
<pre data-src="main.cpp"></pre>
<pre><code class="language-css">p { color: red }</code></pre>
</body>
</html>
但它不起作用。这段CSS 出现在那里,但(与和main.cpp
位于同一文件夹中)没有出现。我有:index.html
prism.js
我应该看看有什么建议吗?
我不习惯 html/css/js。