1 加上CSS:
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;
}2.在文章中將程式碼置於<code></code>區塊中即可,如:
<code>.comment-body-author {<br /> margin:0;<br /> padding:0 0 0 20px;<br />
background-color:#C0C0C0;<br /> }</code效果:
.comment-body-author {
margin:0;
padding:0 0 0 20px;
background-color:#C0C0C0;
沒有留言:
發佈留言