2011-08-25 43 views

回答

1

你已經將你的過渡元素列爲顏色(它將過渡文本的顏色),你的意思是使它背景顏色?

a { -moz-transition:background-color .2s ease-in;-o-transition:background-color .2s ease-in;-webkit-transition:background-color .2s ease-in;background-color:#31c3e7;text-decoration:none } 
#post-list { color:#fff;text-align:center } 
#post-list li { border-bottom:1px solid #4d4949 } 
#post-list li a { color:#fff;display:block;font-size:16px;padding:20px 0 } 
#post-list li a:hover, #post-list li.current a { background-color:#3c3636 } 
#post-list li a:active { } 
#post-list li a span { font-size:12px } 

,在Chrome瀏覽器對我的作品。

+0

謝謝,很好! – John

+0

@John - 不要忘記將問題標記爲已回答! :-) – mwan

+0

不要忘記爲未來版本和已經實現了W3C規範的當前瀏覽器(如Opera)追加'transition:background-color .2s ease-in;'。 –

0

你應該這樣做:

.class li a:hover{ 
    color: #fff; 
} 

你可以改變#FFF任何你想要的顏色。