2008年3月18日

[Edit] How to Post Code?

版面配置->修改HTML

在"]]>"上方加入以下的code
CODE {
display: block; /* fixes a strange ie margin bug */
font-family: Courier New;
font-size: 8pt; /*set font size*/
overflow:auto;
background: #f0f0f0 url(http://klcintw.images.googlepages.com/Code_BG.gif) lef\
t top repeat-y;
border: 2px solid #ccc; /* set border width ; option: solid, dashed, dotted; color*/
padding: 10px 10px 10px 21px;
max-height:200px; /*set code window height*/
line-height: 1.2em;
}


發表文章時切換到html模式在code的頭尾分別加上<code>及</code>

但如果想要在blogger上打出"<code>"這幾個字
會因為先前的修改被判斷成html語法顯示成code欄位
此時可使用代換符號表示
< = &lt; > = &gt;
& =&amp

Reference:
http://jonnyubuntu.blogspot.com/

沒有留言: