一、以下貼在</head>之前
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;
height:200px; // for IE6
line-height: 1.2em;
}
二、建立文章時,把程式碼框在<code>與</code>之間;若文章內容有html程式碼,則最好用html編輯器轉譯成原始碼。
0 意見:
張貼留言