程式碼列表的框框

Posted by: 邱小新 at 上午11:41:00 in

由於 xmp.code 及 xmp.cmd 會繼承 xmp 的所有設定,所以相同的部份就不用再寫一次,只要寫出相異的部份即可,這樣可以省下很多空間,加速網頁傳送速度。另外儘量使用 TAB 來代替 space 可以省下更多的空間;但是請注意在 <xmp></xmp> 中間不要使用 TAB,是無效的。

框框一

<style type="text/css"> xmp { padding: 1em; display: block; font-family: Tahoma,Arial; font-size: 10pt; letter-spacing: 0px; max-height: 1200px; line-height: 1.2em; white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ color: black; border: 1px dashed #2f6fab; background-color: #f9f9f9; } </style>

框框二

<style type="text/css"> xmp.code { color: #000000; border: 1px solid #cccccc; background: #cccccc url(https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uOPljJwqg0sEFFCvfgT8KE0AsGIpG22zjNgSL9v_iFUtEwxjBEYIJYLejFG4lzAQK5PUDGa6uwoyDC4bkDWtyNvo65YY_Lnp4bMipEgvPgFR7U=s0-d) left top repeat-y; } </style>

框框三

<style type="text/css"> xmp.cmd { color: #cccccc; border: 1px solid #cccccc; background: #000000 url(https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_u5qH1K2XCyvFHelzT_OMfv7jwol9kxXtv5HGU0tIDrDqme1UzrCg0LzCMFgcIte98f56Bb7L2HzjOM2M30fkVGmqmm2Wlpc8ok-Tp4KbwrnP0=s0-d) left top repeat-y; } </style>

框框四

<style type="text/css"> xmp.file { font-family: 'Georgia'; color: #000; border: 1px solid #cccccc; background: #FFF url(https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_sMejXmGerZ7X3BWlBDzUtySuqKopvl8HZA47eMHcrHkJJHKEJGjWLc00p0FX6gi9_vlOzP9tnn4k7HjMMvQkPprCe97paSFWM61iwlgbc=s0-d) left top repeat-y; } </style>

框框五

<style type="text/css"> xmp.html { color: blue; border: 1px solid #cccccc; background: #FFF url(https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_t7NhqRLy5er-lXhncJ5E6WGN8YB2ZtwT8cz0zEPOPdRRgKRzbSWX59Z651Tg2XCy749It6yPzlxqWZ-F6s-4qhVIOkRHc1DW7Iq1RHBRc=s0-d) left top repeat-y; } </style>

框框六

<style type="text/css"> xmp.latex { color: #660000; border: 1px solid #cccccc; background: #FFF url(https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_v1YTcMFT4tZOzMiWcMux5tq65rmiHgzFl0-dDAFE6-pluypZluMxtjQ4qGLXyzOS-txOLBYb3MZfhmWQxvZCL7g-SiOeJ30wonVnY_ZWI2=s0-d) left top repeat-y; } </style>

框框七

<style type="text/css"> xmp.comment { padding: 1.2em; color: #CC00FF; border: 1px solid #cccccc; background: #FFFF66 url(https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_tM2baQiEYMs32Z7dvv4_V8GoWpSd-RN2Zn2mncnb91MoDVOIqc1T3yPmfefJGYEiA31sdJ82Yd_Z0VRBOKj6Exg92JrdlowEyX3HcioGIgOXk=s0-d) left top repeat-y; } </style>

框框八

<style type="text/css"> xmp.ref { border: 1px dotted #a88; background: url(https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uTJ6T7aLOjX_tP01yDFo29s38VhP4Vvx1svPa5HnqGYOoGCV-ep9Aus5K1yf1nE1Oxlggu-s3qsP1q5EgI3Dkk4yT20LGZIlOUbRKW5LbSluji_epIKPQ=s0-d) left top no-repeat; line-height: 1.6em; font-size: 13px; font: normal normal 100% 'Lucida Grande',Georgia,'Trebuchet MS'; } </style>

0 意見

張貼留言