我正在尝试使用prettyprint来格式化我的代码的UI,但我没有完成任何格式化。
HTML:
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css" rel="stylesheet">
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
</head>
<body onload="prettyPrint()">
<pre class="prettyprint">
<div> This is a div </div>
<a href="http://www.google.com">Bollywood </a >
</pre>
</body>
</html>
参考文献:
有人可以帮帮我吗?
I want the default layout in the 3rd link provided.
答案 0 :(得分:2)
您的代码链接无效。
https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js 使用这个:
https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js
答案 1 :(得分:1)