<style> 标签内的代码不在 Notepad++ 中 working/showing
Code inside <style> tags not working/showing up in Notepad++
<!DOCTYPE html>
<html>
<head>
<title>Earth Game</title>
下面的代码没有出现在 Notepad++ 中,知道为什么吗?
<style>
canvas {
position: absolute;
top: 0px;
left: 0px;
background: transparent;
}
</style>
其他所有内容都显示为代码,只有上面样式标签中的代码。
</head>
<body onload="init()">
<!-- The canvas for the panning background -->
<canvas id="background" width="600" height="360">
Your browser does not support canvas. Please try again with a different browser.
</canvas>
<script src="EarthGamejs"></script>
</body>
</html>
它的样子:

确保代码没有折叠,为此请检查 np++ 代码的左侧,您应该会看到一个带有加号的小方块,尝试点击它。
编辑: Notepad++ 不支持 CSS 在 HTML 文件中突出显示。您的一种选择是创建一个新的 css 文件,对 css 执行您必须执行的操作,然后将其粘贴回 html 文件。
Duplicate
<!DOCTYPE html>
<html>
<head>
<title>Earth Game</title>
下面的代码没有出现在 Notepad++ 中,知道为什么吗?
<style>
canvas {
position: absolute;
top: 0px;
left: 0px;
background: transparent;
}
</style>
其他所有内容都显示为代码,只有上面样式标签中的代码。
</head>
<body onload="init()">
<!-- The canvas for the panning background -->
<canvas id="background" width="600" height="360">
Your browser does not support canvas. Please try again with a different browser.
</canvas>
<script src="EarthGamejs"></script>
</body>
</html>
它的样子:
确保代码没有折叠,为此请检查 np++ 代码的左侧,您应该会看到一个带有加号的小方块,尝试点击它。
编辑: Notepad++ 不支持 CSS 在 HTML 文件中突出显示。您的一种选择是创建一个新的 css 文件,对 css 执行您必须执行的操作,然后将其粘贴回 html 文件。
Duplicate