无法使用国际象棋API PgnViewerJS渲染按钮的图像

时间:2019-05-05 09:19:52

标签: javascript web-deployment

我正在使用PgnViewerJS API来构建棋盘并复制游戏,该引擎运行正常,但是我无法显示按钮的图像

<!DOCTYPE html>

<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>Annotated moves</title>
    <link rel="stylesheet" href="../css/pgnvjs.css" />
    <link rel="stylesheet" href="../css/prettify.css" />
    <link rel="stylesheet" href="../css/layout.css" />
    <script src="../js/pgnvjs.js" type="text/javascript"></script>
    <script src="../js/prettify.js" type="text/javascript"></script>
</head>

<body class="merida zeit">
    <h2>Annotated moves</h2>
    <h3>Javascript part</h3>
    <pre class="prettyprint lang-js">var pgn = '1. e4$1 e5$2 2. Nf3$3 Nc6$4    3. Bb5$5 a6$6 4. Ba4$7 Nf6$10 5. O-O$13 Be7$14 6. Re1$15 b5$16 7. Bb3$17 O-O$18 8. c3$19 d5$3';
pgnView('b1', {pgn: pgn});</pre>
    <h3>HTML part</h3>

    <pre class="prettyprint lang-html">&lt;div id=&quot;b1&quot; style=&quot;width: 360px&quot;&gt;&lt;&#x2F;div&gt;</pre>
    <p>See the <a href="../examples.html#1101">back link</a> to the original examples page.</p>
    <div>Here the normal layout of the moves, with some special characters, the so called NAGs. PNGViewerJS knows the NAGs, and translates them in the correct notation. The following game is not really correct commented, but it shows the different options. Not all characters are available in all fonts, so we should check that ....</div>
    <div id="b1" style="width: 360px"></div>
    <script>
        var pgn = '1. e4$1 e5$2 2. Nf3$3 Nc6$4 3. Bb5$5 a6$6 4. Ba4$7 Nf6$10 5. O-O$13 Be7$14 6. Re1$15 b5$16 7. Bb3$17 O-O$18 8. c3$19 d5$3';
        pgnView('b1', {
            pgn: pgn
        });
    </script>
    <script>
        prettyPrint();
    </script>
</body>

</html>

这是有效的示例http://mliebelt.github.io/PgnViewerJS/docu/examples/1055.html,这些文件是相同的,我不知道自己在做什么错

0 个答案:

没有答案