为了保证不同块内的超链接效果各自独立,需要用到后代选择器,以下哪个关于超链接的选择器定义方法有问题?
A.
#navi a { text-decoration: none; } #navi a:link,#navi a:visited { color: #000; text-decoration: none; } #navi a:hover { color: #F0F; background-color: #00F; text-decoration: underline; } #navi a:active { }
B.
nav a:link { color: #F00; text-decoration: none; } nav a:visited { color: #000; text-decoration: none; } nav a:hover { color: #F0F; background-color: #00F; text-decoration: underline; }
C.
nav a { text-decoration: none; } nav a:link, nav a:visited { color: #000; } nav a:hover { color: #F0F; background-color: #00F; text-decoration: underline; } a:active { }
D.
nav a { text-decoration: none; } nav a:link, a:visited { color: #000; text-decoration: none; } nav a:hover { color: #F0F; background-color: #00F; text-decoration: underline; }