0

我在一些博客文章中使用 prettify.js。它可以很好地处理我的 html、python 和 js,但缺少 css。

我的html是:

<pre>
<code class="prettyprint lang-css">`

    .my-boxclass {
        display: inline-block;
        position: relative;
        cursor: help;
        border-bottom: 1px dotted grey;
    }
</code>
</pre>

我正在导入美化。这是我正在做的事情的 jsfiddle(也不是正确突出 jsfiddle 的语法) https://jsfiddle.net/kfdqLjm1/2/

4

1 回答 1

2

You need to load the CSS language handler. Try adding ?lang=css after run_prettify.js.

于 2017-04-15T03:33:02.653 回答