您好我尝试为访问过的链接设置背景,但它不起作用。出了什么问题?
CSS
ul a {display:inline-block; background:red url("https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSM7ZUDsq2jyP6Vz2yEmPl1HPVYQ5lUSL5MUoPvZw786K9mDfrWx9ZwYrY") center center no-repeat;
;color:#333;height:40px;line-height:40px;font-size:18px}
ul a:visited { background:blue url("https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRY3mOWqadrnwEId1cCx6fVM_ffhE1OzmnbGcRrkKPv1YGxHUZElGyGuc8") center center no-repeat;
;color:#fff}
HTML
<ul>
<li><a href="http://www.google.com">google</a></li>
<li><a href="http://www.yahoo.com">yahoo</a></li>
<li class="t2" ><a href="http://www.adsense.com">adsense</a></li>
<li><a href="http://www.budamivardi.com">budamivardi</a></li>
<li><a href="http://www.jsfiddle.com">jsfiddle</a></li>
<li><a href="http://www.jsfiddle.com.tr">jsfiddle</a></li>
<li><a href="http://www.jsfiddle.de">jsfiddle</a></li>
</ul>
答案 0 :(得分:1)