梯形或不規則導航可以透過背景圖與浮動排列完成。核心概念是讓每個 li 使用固定寬度,並利用負 margin 讓相鄰項目靠近,形成連續的視覺形狀。

以下為示意圖:


ul { list-style: none; width: 300px; margin: 20px auto; }
li { float: left; width: 86px; height: 25px; text-align: center; margin: 0 -5px; display: inline; }
a {
float: left;
width: 86px;
height: 25px;
background: url(/files/allimg/080407/2038022.gif) center center no-repeat;
}
a:hover {
position: relative;
background: url(/files/allimg/080407/2038021.gif) 0 0 no-repeat;
}
這種做法依賴背景圖本身的梯形外觀,CSS 主要負責排列與 hover 切換。若要更靈活,也可改用 clip-path、border-radius 或 SVG,但在純 CSS 的舊式專案中,背景圖仍是很直接的方案。