<style> a:hover{color:red;} a:visited{color:yellow;} </style> <a href="#">zengxiangzhen</a>
在點擊zengxiangzhen前,經過會變成紅色,但是訪問過後,再次經過時就不會變成紅色了。
解決方法調換hover和visited的位置。
<style> a:visited{color:yellow;} a:hover{color:red;} </style> <a href="#">zengxiangzhen</a>
附:關於a標籤的4中狀態的排序,love hate原則。
l(link)ov(visited)e h(hover)a(active)te。