顯示具有 Google Code Prettify 標籤的文章。 顯示所有文章
顯示具有 Google Code Prettify 標籤的文章。 顯示所有文章

2017年11月1日 星期三

【JavaScript】google-code-prettify 的 run_prettify.js 主題樣式

GitHub:[https://github.com/google/code-prettify](https://github.com/google/code-prettify)
展示網址:[Gallery of themes for code prettify](https://rawgit.com/google/code-prettify/master/styles/index.html) ```html ``` ```html ``` ```html ``` ```html ```

2014年12月27日 星期六

【CSS】在 Blogger 中使用 Google Code Prettify

markdown 步驟一: 先前往範本編輯HTML中,
head 之間放入下列程式碼 ```html ``` 步驟二: 在步驟一的程式碼下方放入下列程式碼 ```html <style> .post .code { display: block; font-family: Courier New; font-size: 10pt; overflow:auto; background: #f0f0f0 url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAASwCAYAAAAt7rCDAAAABHNCSVQICAgIfAhkiAAAAQJJREFUeJzt0kEKhDAMBdA4zFmbM+W0upqFOhXrDILwsimFR5pfMrXW5jhZr7PwRlxVX8//jNHrGhExjXzdu9c5IiIz+7iqVmB7Hwp4OMa2nhhwN/PRGEMBh3Zjt6KfpzPztxW9MSAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzAMwzB8HS+J9kUTvzEDMwAAAABJRU5ErkJggg==) left top repeat-y; border: 1px solid #ccc; padding: 10px 10px 10px 21px; max-height:1000px; line-height: 1.2em; } </style> ``` 步驟三: 寫一段簡單的CODE測試顯示結果 ```java public class HelloWorld { public static void main (String[] args) { System.out.println("Hello, world!"); } } ```

參考資料: