Is there a reason to use a instead of a:link or a:visited in my stylesheet?

后端 未结 5 1001
孤独总比滥情好
孤独总比滥情好 2020-11-30 08:11

Can anyone tell me if there\'s any reason to use a {} instead of (or adjacent to) a:link, a:visited {} in my stylesheet? I\'ve had inconsistent re

5条回答
  •  再見小時候
    2020-11-30 08:18

    Well you could have an anchor that is just an anchor. For example,

    Return to top
    
    Top
    

    Which corrects your false assumption (albeit, an anchor isn't needed for the "top", but it's the most philosophically correct).

    In addition, as Sarfraz said, a {} overrides all occurrences of other a: style properties if styled (and assuming the a {} is after the other a: declarations).

提交回复
热议问题