您可以使用这样的语法。
a:link { text-decoration: none; color : #ff6600; border: 0px; -moz-outline-style: none;}
a:active { text-decoration: underline; color : #ff6600; border: 0px; -moz-outline-style: none;}
a:visited { text-decoration: none; color : #ff6600; border: 0px; -moz-outline-style: none;}
a:hover { text-decoration: underline; color : #000; border: 0px; -moz-outline-style: none;}
a:focus { outline: none;-moz-outline-style: none;}
然后使用CSS继承原则,您可以为
#header
元素并重写您喜欢的任何属性。
#header a:link { text-decoration: underline; color : #000; }
#header a:visited { text-decoration: underline; color : #000; }
阅读有关
CSS inheritance