twitter-bootstrap – twitter bootstrap上的语法高亮
发布时间:2020-12-18 00:16:06 所属栏目:安全 来源:网络整理
导读:我试图突出显示一些语法使用谷歌美化,但到目前为止,它不工作。 link href="prettify.css" type="text/css" rel="stylesheet" /script type="text/javascript" src="prettify.js"/scriptbody onload="prettyPrint()" bgcolor="white"pre class="prettyprint
我试图突出显示一些语法使用谷歌美化,但到目前为止,它不工作。
<link href="prettify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="prettify.js"></script> <body onload="prettyPrint()" bgcolor="white"> <pre class="prettyprint"> <code class="language-css"> // Some source code class Foo { public int Bar { get; set; } } </code> </pre> 有没有一个解决方案,使这项工作,而不会太多的pre标签已经在引导? 解决方法
编辑:对于twitter bootstrap 2.0.x,它适用于2.1.x
使用这两个文件,而不是使用文档中描述的方法。 http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.css http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.js 这对我有用 <!DOCTYPE html> <html lang="en"> <head> <link href="css/bootstrap.css" type="text/css" rel="stylesheet" /> <link href="prettify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="prettify.js"></script> </head> <body onload="prettyPrint()" bgcolor="white"> <pre class="prettyprint linenums languague-css"> // Some source code class Foo { public int Bar { get; set; } } </pre> </body> </html> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |