我正在使用带有 Twitter Bootstrap 的 Google Prettify。它正在工作,但由于某种原因,行号没有出现。
这是标记:
<pre class="prettyprint linenums">
<ol class="linenums">
<li class="L0">
<span class="kwd">public</span>
<span class="pln"> </span>
<span class="kwd">override</span>
<span class="pln"> </span>
<span class="kwd">void</span>
<span class="pln"> </span>
<span class="typ">Dispose</span>
<span class="pun">()</span>
</li>
<li class="L1">
<span class="pln"> </span>
<span class="pun">{</span>
</li>
<li class="L2">
<span class="pln"> </span>
<span class="kwd">base</span>
<span class="pun">.</span>
<span class="typ">Dispose</span>
<span class="pun">();</span>
</li>
<li class="L3">
<span class="pln"> </span>
<span class="pun">}</span>
</li>
</ol>
</pre>
我这样称呼它:
<script type="text/javascript">
$(document).ready(function () {
prettyPrint();
});
</script>
我没有任何自定义 CSS .. 仅使用 Bootstrap CSS ..