padding,IE 有 margin。統一重置:ul { margin: 0; padding: 0; }。.box { color: red !important; color: blue; }(FF 紅,IE 藍),僅限應急,事後必須重構。margin,避免外層 padding 疊加導致佈局難控。li { background: url(icon.png) no-repeat left center; padding-left: 20px; } 替代 list-style-image,定位更精準。background: #333 url(bg.png); 圖片載入失敗時文字仍可讀。:link → :visited → :hover → :active,避免互相覆蓋。<img> + alt。#8899FF → #89F,減少體積。<table> 語義與渲染皆優於 DIV 模擬。<script type="text/javascript">,廢棄 language 屬性。<h1><span>標題</span></h1>,便於圖片替換或隱藏文字。table { border-collapse: collapse; } td { border: 1px solid #000; }。width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;(IE5+ 有效,FF 隱藏不顯示省略號)。<!--[if !IE]>註釋內容<![endif]-->。@font-face { font-family: 'MyFont'; src: url(font.woff2) format('woff2'); }。line-height 無效,改用 padding-top/bottom 撐高。a { color: red; text-decoration: none; },再單獨覆蓋 :hover。若只寫 :link 必補全四態。padding-top: 5px; padding-right: 6px; 避免重複聲明且免查原值。text-align: justify; text-justify: inter-ideograph;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;word-break: break-all; word-wrap: break-word; table-layout: fixed;這 25 條技巧涵蓋兼容性重置、選擇器策略、佈局細節、文字處理、效能與維護等核心場景。建議團隊內部化為「代碼審查清單」,新人入職必讀,老專案重構時逐項對照修正。