2012-02-10 167 views
0

我基本上測試CSS按鈕在ul的導航中使用,我可以讓僞類去做我想要的大部分事情,但我似乎無法獲得背景色來改變! 這可能是我應該看到的那些愚蠢的東西之一,但也許別人會看到我的錯誤。a:主動不改變背景顏色

a:Active { 
    /* General */ 
    /* Size */ 
    height: 30px; 
    width: 100px; 
    background-position:0 2px; 
    color:#F00; 

    /* Stroke */ 
    border: 1px solid hsla(0.0, 0.0%, 42.0%, 0.52); 
    -moz-border-radius: 0px; /* FF1-3.6 */ 
    -webkit-border-radius: 0px; /* Saf3-4, iOS 1-3.2, Android <1.6 */ 
    border-radius: 0px 0px 0px 0px; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */ 

    /* Label */ 
    font-family: "Lucida Grande","Verdana","Arial","sans-serif"; 
    font-size: 0.9em; 
    text-align: center; 
    font-weight:normal; 
    display:block; 

    /* Shadow & Inner Shadow */ 
    box-shadow:inset 0px 0px 2px hsla(0.0, 0.0%, 65.9%, 0.58); 

    /* Opacity */ 
    opacity: 1.000; 
} 
+1

您沒有在您提供的代碼中的任何位置設置背景。而'a:主動'應該是'a:主動' – 2012-02-10 07:11:19

+0

http://pastebin.com/mLUjgQhz 以下是完整的東西, – andy 2012-02-10 10:20:48

+0

沒有人知道答案? – andy 2012-02-10 20:39:32

回答

0

您需要在您的CSS中有background-color!你只有color

+0

是的,我曾嘗試過 - 甚至背景顏色:#不起作用 – andy 2012-02-10 10:00:39

0

你的背景色在哪?

我猜你的錯誤是color: #F00;這應該是background-color: #F00;,也什麼桑迪普說。

+0

這也不工作,值得注意的是,標記的其他部分,像背景位置! – andy 2012-02-10 10:01:33

+0

然後可能是別的什麼不對。 – elclanrs 2012-02-10 16:41:45