推 kaiuisme:推這篇文章 12/03 23:38
※ 引述《sjgau (sjgau)》之銘言:
: 我需要 經常在我的部落格上面貼
: 程式碼的 source code, 需要 程式縮排
: 請問 哪一個部落格 平台會比較適合
: 謝謝回覆
其他家不清楚,我是用Blogger,很方便,
只要去Template→Edit HTML,
在Posts的部分加上以下語法,
CODE {
display: block; /* fixes a strange ie margin bug */
font-family: Courier New;
font-size: 8pt;
overflow:auto;
background: #f0f0f0 url(http://klcintw.images.googlepages.com/Code_BG.gif) left top repeat-y;
border: 1px solid #ccc;
padding: 10px 10px 10px 21px;
max-height:200px;
line-height: 1.2em;
}
之後文章中要貼語法時,
只要把語法放在<code></code>之間就可以了。
效果請看 http://tinyurl.com/y79fss
---
歡迎到我的部落格坐坐 http://khaihiok.blogspot.com/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.249.126