解法是利用DIV+CSS:
<div style="white-space:nowrap; overflow:auto">
原始碼...
</div>
原始碼...
</div>
overflow:auto 超過寬度/高度之後, 就會自己產生Scrollbar
white-space:nowrap 沒這個屬性的話他會自動換行
測試輸出:
// Author : Jung-Yin, Chine @ SCREAM LAB
// Date : 2008/11/13
// Date : 2008/11/13
- #include <stdio.h>
 - #include <stdint.h>
 - typedef struct _ELEMENT{
 - int a;
 - uint8_t pad[16-sizeof(int)];
 - }ELEMENT;
 - ELEMENT a[10] __attribute__ ((aligned (16)));
 - int b[10] __attribute__ ((aligned (16)));
 - int c[10];
 - int main()
 - {
 - int ival __attribute__ ((aligned (16)));
 - int ival2 = 0;
 - // variable alignment
 - // ARRAY alignment
 - // ARRAY ELEMENT
 - // compare
 - // ARRAY ELEMENT
 - return 0;
 - }
 
不過哪個人講一下怎樣用Syntax Highlight
1 則留言:
http://tools.devshed.com/webmaster-tools/syntax-highlighting/
這個網址就可以Sytax-Heighlighting
把程式碼直接丟進去就可以了
當然有比較漂亮的,不過那些東西好像似乎都要再安裝套件,而這個不用。
張貼留言