在 Dreamweaver 中定義連結 CSS 時,樣式順序會影響滑鼠移過後的顯示結果。若順序不對,可能會出現 visited 狀態覆蓋 hover 效果的問題。
建議順序為:先定義 a:link,再定義 a:visited,最後定義 a:hover。也就是未造訪、已造訪、滑鼠移過的順序。
例如:
a:link { color: #3333FF; text-decoration: none; }
a:visited { color: #3333FF; text-decoration: none; }
a:hover { color: #FF3333; text-decoration: underline; }
這樣可以確保滑鼠移過時,顏色與底線能正確顯示。